I'm currently administrating a FreeBSD 9 server with multiple sites hosted.

For example:


I need to grant read/write permissions to developers so they will be able to upload / download files from those sites.

There are different combinations of permissions to different developers. For example,

Developer 1 needs access to all sites
Developer 2 needs access to example2.com 
Developer 3 needs access to example3.com 

How should i setup the permissions in the server / ftp config file so that it will work as needed + will continue to work when new files are created?

Today when a developer is creating a new folder/file, it gets default permissions which are allowing only the creator to read/write that file.


  • I think, you should use git instead of ftp for such requirements.
    – mate64
    Apr 21, 2013 at 11:41
  • FTP is always a bad idea these days; though I'm hoping you at least mean FTPeS/iS. As long as we're beating on FTP: SFTP, Git, and Hg are great alternatives in cases like this.
    – Chris S
    Apr 21, 2013 at 12:12

1 Answer 1

  1. Use chmod to SetUid and SetGid on the folders they're accessing. This causes new files and folders in that directory to inheirt the user/group of that folder instead of the user creating the files.

  2. If you can create access groups that nicely clump the developers, that's the preferred method of access administration. Failing that, use file system ACLs.

    You might have to enable ACLs, you can either use Posix or NFSv4 (the latter being much more complex, though similar to NTFS permissions): tunefs -a enable /dev/disk or tunefs -N enable /dev/disk (for Posix and NFSv4 respectively)

    Then use getfacl and setfacl for either style permissions. See their man pages for more details. Ask a new question if they give you any serious troubles.

  • But how will i set access to the same website to multiple users? some with access to only this specific site, and others with access to other sites aswell?
    – shaharmor
    Apr 21, 2013 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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