fbpx

Correct owner and permissions for folders and files on linux

Correct owner and permissions for folders and files on linux

This command will change ownership of the folder recursively

chown -R username:groupname /var/www/

This command will change folder permissions recursively

find /var/www/ -type d -exec chmod 755 {} \;

This command will change files permissions recursively

find /var/www/ -type f -exec chmod 644 {} \;

 

Share this post