Hey all,
Currently I’m running a Wordpress multisite configuration. Here I’ve recursively set www-data as the owner of /var/www to allow Wordpress write access in it’s whole installation. All folders within /var/www have their permissions set to 755. Now I’d like to still connect to my server using SFTP to add/edit/delete files using another (sudo) user, which isn’t possible.
What would be presumed best practice to solve this problem? Thanks in advance! Lorenzo
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi,
you can create a new group
add your (sudo) user and www-data to this group
change directory owner
change permissions for the directory
the “prefix” 2 is a Set group ID bit, which causes the group to be copied to all new files and folders created in that folder. This does not work recursively, so you need to set it for existing folders manually
Hi,
you can create a new group
add your (sudo) user and www-data to this group
change directory owner
change permissions for the directory
the “prefix” 2 is a Set group ID bit, which causes the group to be copied to all new files and folders created in that folder. This does not work recursively, so you need to set it for existing folders manually
Hi,
you can create a new group
add your (sudo) user and www-data to this group
change directory owner
change permissions for the directory
the “prefix” 2 is a Set group ID bit, which causes the group to be copied to all new files and folders created in that folder. This does not work recursively, so you need to set it for existing folders manually
It works and allows you to create a file and all files created there from FTP is with username:www-pub but even after placing that file not allows you delete that file as in this case again it shows permission denied.
Any Suggestions
Hi,
you can add your (sudo) user to the same group as www-data and then add read/write/execute permissions to the directory (775) for this group. Something like this: http://serverfault.com/a/65416