Report this

What is the reason for this report?

Issues with SFTP access after using sudo find command

Posted on March 5, 2021

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,

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.