Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Proftpd - как настроить upload? (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
cord
Guru
Guru


Joined: 28 Apr 2007
Posts: 303

PostPosted: Sat Dec 29, 2007 10:13 pm    Post subject: Proftpd - как настроить upload? (SOLVED) Reply with quote

Установил пакет, запустил демон.
Появилась папка /home/ftp в которую автоматически входит, через ftp://localhost
Со скачкой проблем нет, а вот загрузку в подпапку upload никак настроить не получается :( Пишет Could not write...

вот конфиг
Code:

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anonymous access.

ServerName         "ProFTPD Default Installation"
ServerType         standalone
DefaultServer      on
RequireValidShell   off
#AuthPAM            off
#AuthPAMConfig      ftp
# Port 21 is the standard FTP port.
Port            21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask            022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit the maximum number of processes per service
# (such as xinetd).
MaxInstances      30

# Set the user and group under which the server will run.
User            proftpd
Group            proftpd

# Normally, we want files to be overwriteable.
<Directory />
   AllowOverwrite      on
</Directory>

# A basic anonymous configuration, with no upload directories.
<Anonymous ~ftp>
   User            ftp
   Group            ftp

   # We want clients to be able to login with "anonymous" as well as "ftp".
   UserAlias         anonymous ftp

   # Limit the maximum number of anonymous logins.
   MaxClients         10

   # We want 'welcome.msg' displayed at login, and '.message' displayed
   # in each newly chdired directory.
   DisplayLogin         welcome.msg
   DisplayFirstChdir      .message

   # Limit WRITE everywhere in the anonymous chroot.
   <Limit WRITE>
      DenyAll
   </Limit>
</Anonymous>

<Directory ~ftp/upload/*>
                <Limit READ RETR GET WRITE STOR CWD MKD RMD DELE>
                    AllowAll
                </Limit>

                <Limit READ>
                    DenyAll
                </Limit>
            </Directory>

Что не так?


Last edited by cord on Sun Dec 30, 2007 8:02 am; edited 1 time in total
Back to top
View user's profile Send private message
cord
Guru
Guru


Joined: 28 Apr 2007
Posts: 303

PostPosted: Sun Dec 30, 2007 7:57 am    Post subject: Reply with quote

Сам спросил, сам отвечаю :)
Директиву <Directory > надо писать внутри директивы <Anonymous >
Теперь все работает :)
Code:

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anonymous access.

ServerName         "ProFTPD Default Installation"
ServerType         standalone
DefaultServer      on
RequireValidShell   off
#AuthPAM            off
#AuthPAMConfig      ftp
# Port 21 is the standard FTP port.
Port            21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask            022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit the maximum number of processes per service
# (such as xinetd).
MaxInstances      30

# Set the user and group under which the server will run.
User            proftpd
Group            proftpd

# Normally, we want files to be overwriteable.
<Directory />
   AllowOverwrite      on
</Directory>

# A basic anonymous configuration, with no upload directories.
<Anonymous ~ftp>
   User            ftp
   Group            ftp

   # We want clients to be able to login with "anonymous" as well as "ftp".
   UserAlias         anonymous ftp

   # Limit the maximum number of anonymous logins.
   MaxClients         10

   # We want 'welcome.msg' displayed at login, and '.message' displayed
   # in each newly chdired directory.
   DisplayLogin         welcome.msg
   DisplayFirstChdir      .message

   # Limit WRITE everywhere in the anonymous chroot.
   <Limit WRITE>
      DenyAll
   </Limit>

<Directory upload/*>
                <Limit READ RETR GET WRITE STOR CWD MKD RMD DELE>
                    AllowAll
                </Limit>

#                <Limit READ>
#                    DenyAll
#                </Limit>
            </Directory>
</Anonymous>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum