0

I've got a python script running on some client machines that calls home to an Ubuntu 8.04 LTS server running ProFTP..

I created a user called userftp on the server and have hopefully denied it shell access with this:

sudo useradd userftp -p your_password -d /home/FTP-shared -s /bin/false

I had initially set permissons on the /home/FTP-shared directory with :

sudo chmod 755 FTP-shared

But when the script ran from a client, it could not write to that directory..

So I set permissions on /home/FTP-shared with :

sudo chmod 777 FTP-shared

So /home/FTP-shared now has its access set as :

drwxrwxrwx  4 root        root        4096 2010-03-04 21:11 FTP-shared

I don't like the fact that the directory is now wide open... Is there a safer way to do this, or since the client has to write to it, is this the only way?

1 Answer 1

1

It's well advised to set the sticky bit on directories like that. Then, only the owner of the directory and owner of the file may remove content from the directory.

chmod +t FTP-shared

In more detail, the performance you describe is typically considered the incoming directory in FTP land. For any special handling of the uploads, that can be configured in the daemon.

As far as having it world writable, that's not entirely necessary. If you want literally everyone (such as anonymous) to be able to write to it, it is. However, if it's a limited subset of known users, you can create a group, add all the users to the group, set permissions 775 or 770 with the SGID bit set.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .