How to change the permissions on the folders and files. Change of ownership

How to change the permissions on the folders and files at the same time?
# Chmod -R 775 / usr / share / www /
All categories and files directory / usr / share / www / 775 will be set right
How to change the owner’s files and folders?
# Chown -R root: root / usr / share / www /
How to change permissions only files?
# Find / usr / share / www / -type f -exec chmod 644 {} \;
How to change permissions only folders?
# Find / usr / share / www / -type d -exec chmod 755 {} \;
How to change the ownership of files only?
# Find / usr / share / www / -type f -exec chown user: group {} \;
How to change the owner of folders only?
# Find / usr / share / www / -type d -exec chown www: www {} \;

Leave a Reply

Your email address will not be published. Required fields are marked *