timvand
asked on
Configure vsftpd for anonymous read/write
I have installed Trustix 3.0, 2.6.16 which has the option to default install vsftp. The directory structure is as follows;
root@actilx01 /home/ftp# pwd
/home/ftp
root@actilx01 /home/ftp# ls -l
total 16
d--x--x--x 2 root root 4096 Jun 2 2005 bin/
d--x--x--x 2 root root 4096 Mar 25 19:13 etc/
d--x--x--x 2 root root 4096 Jun 2 2005 lib/
drwxr-sr-x 4 root root 4096 Mar 26 09:58 pub/
root@actilx01 /home/ftp# ls -l pub/
total 112
drwxr-sr-- 2 root root 4096 Mar 26 10:00 download/
-rw----r-- 1 root root 99720 Mar 26 05:31 memtest
drwx-ws-wx 2 root root 4096 Mar 26 09:44 upload/
Here is the vsftp.conf file;
anonymous_enable=YES
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsft pd/xfer.lo g
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=12 0
nopriv_user=ftp
ftpd_banner=vsftpd (Trustix)
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
secure_chroot_dir=/var/lib /vsftp/chr oot
anon_world_readable_only=Y ES
download_enable=YES
Currently, it is possible to write/upload files to pub/upload. When attempting to cd to pub/download, the following error occurs;
550 Failed to change directory
I suspect it is a permissions issue, just not clear on the what the issue is or how to correct it.
Thanks in advance for any assistance.
Tim
root@actilx01 /home/ftp# pwd
/home/ftp
root@actilx01 /home/ftp# ls -l
total 16
d--x--x--x 2 root root 4096 Jun 2 2005 bin/
d--x--x--x 2 root root 4096 Mar 25 19:13 etc/
d--x--x--x 2 root root 4096 Jun 2 2005 lib/
drwxr-sr-x 4 root root 4096 Mar 26 09:58 pub/
root@actilx01 /home/ftp# ls -l pub/
total 112
drwxr-sr-- 2 root root 4096 Mar 26 10:00 download/
-rw----r-- 1 root root 99720 Mar 26 05:31 memtest
drwx-ws-wx 2 root root 4096 Mar 26 09:44 upload/
Here is the vsftp.conf file;
anonymous_enable=YES
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsft
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=12
nopriv_user=ftp
ftpd_banner=vsftpd (Trustix)
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
secure_chroot_dir=/var/lib
anon_world_readable_only=Y
download_enable=YES
Currently, it is possible to write/upload files to pub/upload. When attempting to cd to pub/download, the following error occurs;
550 Failed to change directory
I suspect it is a permissions issue, just not clear on the what the issue is or how to correct it.
Thanks in advance for any assistance.
Tim
ASKER
Ok.
Here is the output from ps -ef;
root@actilx01 /home/ftp# ps -ef |grep ftp
root 2601 1 0 10:13 pts/1 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root 2633 1977 0 13:38 pts/1 00:00:00 grep ftp
root@actilx01 /home/ftp#
It would appear to be running as root. Seems kind of sketchy, however, this is the default config. If I understand correctly, this parameter is what the service runs under though, nopriv_user=ftp. Any other suggestions or what else am I missing here?
Appears to be working, however the files in the /download need to have the go+r set, correct?
Thanks for the prompt reply.
T
Here is the output from ps -ef;
root@actilx01 /home/ftp# ps -ef |grep ftp
root 2601 1 0 10:13 pts/1 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root 2633 1977 0 13:38 pts/1 00:00:00 grep ftp
root@actilx01 /home/ftp#
It would appear to be running as root. Seems kind of sketchy, however, this is the default config. If I understand correctly, this parameter is what the service runs under though, nopriv_user=ftp. Any other suggestions or what else am I missing here?
Appears to be working, however the files in the /download need to have the go+r set, correct?
Thanks for the prompt reply.
T
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
so you can either
chown nobody download/
or enable access to the directory to all non root users:
chmod o+x download/
hope this help