Changing file and folder permissions via SSH

Honestly borrowed help lines from reg.ru on changing access rights to files and folders on hosting via SSH.

find /dir_name -type d -exec chmod 755 {} \;
find /dir_name -type f -exec chmod 644 {} \;

Where dir_name is the full path to the root folder of the site.

The first command will change the permissions for all directories inside the specified one to 755.

The second is for files inside the specified directory at 644.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
The comment language code.