Before You Begin
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.
Choose one of the following options used with the recursive –R option of the chmod command.
–P – Changes the mode of a directory or file unless it is the object of a symbolic link, which prevents the traversal of any symbolic links.
$ chmod -R -P mode directory | file
This option is the most secure setting. To see what has changed or not changed and why, add the verbose –v option.
–H – Changes the mode of a directory or file that is the object of a symbolic link and the files in the file hierarchy below the directory.
$ chmod -R -H mode directory | file
If a symbolic link is found when traversing a file hierarchy, the mode of the target directory is changed but no recursion takes place. To see what has changed or not changed and why, add the verbose –v option.
–L – Changes the mode of objects of symbolic links and files by traversing all symbolic links recursively. This option is the default option and is the most permissive.
$ chmod -R -L mode directory | file
For more information, see the chmod(1) man page.
% ls -lR directory