Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

For example:

example1.com
example2.com
example3.com

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 
etc.

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.

Thanks

share|improve this question
    
I think, you should use git instead of ftp for such requirements. –  cept0 Apr 21 '13 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 '13 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.

share|improve this answer
    
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? –  DeaglinG Apr 21 '13 at 12:41

Your Answer

 
discard

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.