Centos – Root overwrite permission to user

centosroot

Our developers WinSCP/Putty and have a dev user on our web-server. The site directory they are working on is owned by apache, that restricts them to overwrite files through FTP/SFTP as dev. I have added the dev user to the apache group, yet it doesn't help. Even though they have root privileges they can't sudo -s through a FTP client. If I log them in with root through WinSCP I don't find an option to only restrict them to that specific directory. How can I solve this issue in a good way?

Best Answer

It could be that the apache group doesn't have write permission to the folder, check:

ls -l /folder path

if you see something close to rwxr-xr-x, then group only has read+exec on folder, use:

chmod 775 -Rf /path to your folder

in order to recursively add write permissions to folder group, hope this helps!

Set apache as the group owner of the site directory:

chown :apache -R folder/