Привет,
имам инсталиран ftp server - "proftpd-1.3.0". Това, което искам да направя е следното: в системата има "реален" потребител с username="user & password="*****", който се логва и работи нормално в домашната си директория с ProFtpd, и искам да позволя на анонимнити логвания (без user&pass) да четат въпросната домашна директория.
По този начин ако се логнеш анонимно имаш права само за четене в тази директория, а ако се логнеш с username="user & password="*****" имаш и за писане.
Ето
тук има описан такъв пример.
При мен проблема е, че с "реалния" потребител няма проблем, но опита за свързване, като анонимен такъ завършва с
Примерен код |
USER anonymous
331 Anonymous login ok, send your complete email address as your password. PASS xxxx 530-Unable to set anonymous privileges. 530 Login incorrect.
|
Ето какви са правата в за съответната директория:
Примерен код |
ls -la /home/ total 2 drwxr-xr-x 5 root root 128 Sep 20 01:11 . drwxr-xr-x 19 root root 472 May 31 14:42 .. -rw-r--r-- 1 root root 0 Mar 11 2005 .keep drwxr-xr-x 22 user user 1424 Sep 20 02:38 user
|
Ето и конфигурационния файл на ProFtpd:
Примерен код |
ServerName "Senser ProFTPD server" ServerType standalone DefaultServer on
RequireValidShell off #AuthPAM on #AuthPAMConfig ftp RootLogin off
# Port 21 is the standard FTP port. Port 21
DebugLevel 3
UseReverseDNS off IdentLookups off
# 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 maximum number of processes per service # (such as xinetd). MaxInstances 5
DefaultRoot ~
# Set the user and group under which the server will run. User ftp Group ftp
# Normally, we want files to be overwriteable and resumed. <Directory /> AllowOverwrite on AllowRetrieveRestart on AllowStoreRestart on </Directory>
# A basic anonymous configuration, no upload directories. <Anonymous ~user> User user Group users AnonRequirePassword off MaxClients 5 AuthAliasOnly on
# We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message
# We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous user
# Limit WRITE everywhere in the anonymous chroot <Limit WRITE> DenyAll </Limit>
<Limit READ DIRS STOR CWD CDUP> AllowAll </Limit>
</Anonymous>
|