Batch modify file (or folder) owner or permission

  

need to use two commands, chmod and chown

Example: All files and subdirectories under /opt/oracle/directory Perform the same permission change:

chmod -R 700 /opt/oracle/

-R parameter is all files and subfolders under recursive processing directory

700 The changed permissions indicate (only the owner has read and write and execute permissions)

/opt/oracle/is the directory to be executed

Example: Under the /opt/oracle/directory All files perform the same owner change as the subdirectory, and the owner is modified to the oracle user of the oinstall user group

chown -R oracle:oinstall /opt/oracle/

-R

oracle:oinstall oinstall user group oracle, user group does not have to be

Copyright © Windows knowledge All Rights Reserved