How to change the permissions to multiple files at once?
Hi,
I moved to a new server with cPanel account with PrestaShop installed there (on the old server was also Cpanel). Unfortunately, for reasons unknown to me on the new server, all files are PrestaShop powers 666. A should be 644.
Presta has a huge number of files in multiple directories and subdirectories.
Is there a simple way to change the permissions of all files?
-
find /home/username/public_html/prestashop -type d -perm 0777 -exec chmod 755 {} \; find /home/username/public_html/prestashop -type f -perm 0666 -exec chmod 644 {} \;
Assuming thats where your shop is, they should work.0 -
I'm not an expert in this field. Please tell me where I got this code apply? I logged in to the server via SSH (puty) and I wanted to use this code, but getting feedback messages such as: "-bash: -type: command not found", "-bash: type: -perm: not found", "..." What am I doing wrong? 0 -
Do you have root access to this server? 0 -
YES. 0 -
Hi, May I know are you access your server directly with root user or first access server with super-user then root? Also, let me know which OS installed on your server. 0 -
excuse me! My mistake. I made a mistake typing a command! Now it is discovered. The code worked. Thanks a lot! 0 -
Hello :) I am happy to see you were able to address the issue. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
7 comments