Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.