Link to home
Start Free TrialLog in
Avatar of timvand
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/vsftpd/xfer.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
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/chroot
anon_world_readable_only=YES
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
Avatar of Gabriel Orozco
Gabriel Orozco
Flag of Mexico image

in order to enable users to access, check with what user is vsftp running. I bet it is nobody user.

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
Avatar of timvand
timvand

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
ASKER CERTIFIED SOLUTION
Avatar of Gabriel Orozco
Gabriel Orozco
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial