CityHost.UA
Help and support

How to set access rights to files and folders using SSH?

To restore access rights to files and folders, you need to connect to the server via SSH. Necessary and sufficient access rights: 644 - for files, 755 for folders.

You can find connection instructions in the [WORKING WITH SSH] section .

— to set access rights (755) on the directory, execute the command:

 cd $HOME/www && find ./ -type d -exec chmod 0755 {} \;

— to set access rights (644) to files, execute the command:

 cd $HOME/www && find ./ -type f -exec chmod 0644 {} \;

Or you can use a combined command that will perform the same actions as the previous two ( recommended ):

 cd $HOME/www && find ./ -type f -exec chmod 0644 {} \; -or -type d -exec chmod 755 {} \;