Saturday, 29 September 2012

change permission of all files and folders

Just run following commands after login to the server via ssh as root.

[/home/user/public_html]# find . -type f -exec chmod 0644 {} \;      // To change permission for all files under public_html directory to 644

[/home/user/public_html]# find . -type d -exec chmod 0755 {} \;     // To change permission for all directories under public_html directory to 755

No comments:

Post a Comment