I got some trouble with a server situation, where i keep some configuration files in a sub-directory of a web project. Using my superuser account, i make changes to these files, which NetBeans commits for me, by uploading them.

But the client needs to be able to access and modify these files via ftp. I was able to run a chown ftpuser *.* and it worked, but only until i re-uploaded the file, after which it was again owned by me, and the client could no longer modify it.

How can i make these files modifiable by me and the client?

(It's Debian 6.0 running on Plesk 11)


1 Answer 1


You should look up file-based ACLs (FACL), as they're made to do what you are looking to do.

The short version is you set the partition in question to track file-based acl permissions by editing your /etc/fstab and add the "acl": option:

#example /dev/VolGroup00/LogVol02 / ext3 defaults,acl 1 1

Then you set the appropriate FACL on the directory you want the client to access:

#set existing owner/group to rwx chmod ug=rwX -R /some/ftp/directory

#set existing files/folders to rwx for ftpuser setfacl -m u:ftpuser:rwX -R /some/ftp/directory

#set future files/folders to rwx for ftpuser setfacl -dm u:ftpuser:rwX -R /some/ftp/directory

(Note that we set the existing owner and group to rwx because FACLs are limited to the owning group's permissions. There are other ways around this, but the easiest is just ensuring the owning group as rwx)

Links: http://linuxcommando.blogspot.com/2007/12/basic-linux-permission-model-lets-you.html http://retrop.wordpress.com/2012/02/10/enabling-file-acls-in-debian-6-access-control-lists/

You must log in to answer this question.

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