Folder And File Permissions
Folder and file permissions are an important aspect of web design. They need to be set carefully to allow the server and users the correct privileges so they can use the site correctly, however they need to be strict enough so that there are no security vulnerabilities.
Bulk Change Of Permissions Using SSH
You can change the permissions of a folder and all sub-folders by using the following command:
You can do a similar thing, but this time with files in the current folder and all sub-folders by changing the -type d
to -type f
as in the following command:
You can do a test run to make sure it will do the right thing by inserting the command echo
between -exec
and chmod
, as shown in the following command: