0

I am aware that there are multiple posts about this on the Stack Exchange network, however many suggest similar things such as setting everything to 777, which is just plain bad.

Problem

I am trying to SFTP to our Google Cloud server, but getting "Permission denied". My SSH key is on the server, and all files and folders are set to the owner of www-data:www-data with default Wordpress permissions of 755 for directories and 644 for files.

Things I've tried

If I set all files and folders to the owner of myusername:myusername, everything works, however other developers are then unable to SFTP.

I read of a solution of adding a group to visudo called google-sudoers and adding the line google-sudoers ALL=(ALL) ALL, then setting the owner of all files and directories to www-data:google-sudoers. This doesn't work either.

Is there a way to give all our developers access to SFTP without setting all folders and files to 777?

Your Answer

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

Browse other questions tagged or ask your own question.