[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Configure vsftpd for anonymous read/write

Posted on 2006-03-27
3
Medium Priority
?
415 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:timvand
  • 2
3 Comments
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 16307201
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
0
 

Author Comment

by:timvand
ID: 16308067
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
0
 
LVL 19

Accepted Solution

by:
Gabriel Orozco earned 750 total points
ID: 16308118
oops... yes, if the config file say that, then the ftp user is running as user "ftp".

so choose one or the other (or both, hehehehe)

chown ftp download
and the
chmod go+rx download

keep in mind a directory needs the "x" permission in order to allow you to enter inside it
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month20 days, 1 hour left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question