Linux command to modify files and folders within folder
I like to use Linux command to modify all files and folders within folder inside a folder called wp-content.
1. Which command should be used to set all folders within a folder named wp-content as 755?
2. Which command should be used to set all file within a folder named wp-content as 644?
An example:
chmod 0755 /home/USERXXX/public_html/ wp-content/
Need help.
-
cd /home/USERXXX/public_html/ wp-content/ find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; EDIT must be "-exec" not "--exec". 0 -
It will be pushed the following output: find: unknown predicate `--exec' I have already a file inside directory with the permission 644 but sub folders and files should be detected. Is it a command correct or I made mistake? 0 -
oops it's "-exec" not "--exec" :eek: 0 -
It seems it was not modified. How to validate all permission using Linux command that files have permission set as 644 and folders as 755? 0 -
I see now it was modified. Thank you for the message! 0 -
It seems it was not modified. How to validate all permission using Linux command that files have permission set as 644 and folders as 755?
find files whose permissions are not 644 find . -type f ! -perm 644 -ls find directories whose permissions are not 644 find . -type d ! -perm 755 -ls0 -
Thank you for the message! It works now even WordPress Toolkit does not react to modifications as it seems it is based on intervals and verification cron jobs... 0
Please sign in to leave a comment.
Comments
7 comments