Question
Issues with SFTP access after using sudo find command
Hello,
I ran the following commands yesterday to update the permissions on files and directories for my WordPress site and now I cannot connect to the parent directory (name.com - example directory name) using SSH or SFTP.
sudo find /var/www/name.com/ -type f -exec chmod 640 {} \;
sudo find /var/www/name.com/ -type d -exec chmod 750 {} \;
These commands were recommended on this tutorial article: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04.
My FTP client (Transmit, macOS) displays this error when trying to connect: Could not change directory to “/var/www/callkneehill.ca/wp-content/themes”.
Could someone share what is going wrong and possibly let me know how best to set permissions so that SSH and SFTP work correctly.
Cheers,
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.
×