0

I have a development server I have multiple FTP users accessing and uploading multiple files. I have it working where two users can upload and modify files they created or didn't create.

The issue I have is since all the files are owned by the group apache (Both users are apart of this group. Security isn't an issue on this server) They cannot set permissions on files. I can't see the folders to 777. Although for now that would work, we don't want that. So how can I set it up so both users can set permissions on files/folders that are group owned?

2

You cannot set permissions on a file you do not own. Only the owner of the file, or root, can set permissions.

You may be able to adjust the user's umask or the FTP process umask to allow for group-write permission on newly uploaded or created files. A combination of SGID on the FTP directory along with appropriate group membership of your users may help as well. Be aware that users with group-write permissions will be able to delete files belonging to another user in SGID directories, so you may want to set the "sticky bit" on those directories to allow deletion/overwrite only by the owner.

Lastly, you could setup a root cron job to run every minute and adjust what's needed on files in the FTP directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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