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 have client who is the owner of a printer shop. I have configured for him an FTP Server where clients can drop him big files they want to print.

I have created several FTP users. He has some premium clients and some regular clients. Regular clients are told to use the FTP user clients. The owner has a folder called clients with the next permisions.

printshopowner# ls -la
drwx-----x 9 printshopowner printshopowner   4096 Aug 17 08:07 .
drwx-wx-wx 9 printshopowner clients          4096 Jan 19 10:24 clients
drwxrwx--- 2 premiumuser    printshopowner 4096 Jan 19 08:13 premiumuser

It is working fine. A Client can upload files without seeing other clients' files. Problem is when a client uploads a folder. The FTP user printshopowner can not delete these folders.

[printshopowner/clients]# ls -la
drwx-wx-wx 9 printshopowner clientes         4096 Jan 19 10:24 .
drwx-----x 9 printshopowner printshopowner   4096 Aug 17 08:07 ..
drwxr-xr-x 3 clients        clients          4096 Dec  3 11:57 folderA

Any idea how should I configured the FTP dropbox to achieve the desired functionality?

share|improve this question
Which FTP Server? – LukeR Jan 19 '10 at 11:27
up vote 2 down vote accepted

You can try setting local_umask in vsftpd.conf

local_umask = 0002

Also consider looking into file_open_mode. This controls the permissions with which uploaded files are created with umasks being applied on top of this value.

share|improve this answer

To delete (or to say it properly "unlink") file/directory X, a user does not need to have ownership of X, or neither write permission on X, but they have to have write permission on the X's parent directory.

In your case, printshopowner can delete (rmdir) folderA, but only if it is empty. User printshopowner cannot delete anything inside folderA (no write permission for him there). If you change clients' umask to 002, he will make folderA as "drwxrwxr-x" and printshopowner will be able to delete it (I assume printshopowner is assigned to both groups printshopowner and clients). No idea how to change umask in your FTP server.

share|improve this answer
My FTP Server is a Linux server – Sergio del Amo Jan 28 '10 at 15:47
I have tried to set umask in .bashrc with umask 002 without success. Any idea? – Sergio del Amo Jan 28 '10 at 16:08
Without knowing your FTP server, you probably need to set the umask in the ftpd.conf (or something close to) and cycle the FTP daemon to pick up the change. – Joshua Jan 28 '10 at 18:06
My FTP server is vsftpd – Sergio del Amo Jan 28 '10 at 18:10

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.