在以下过程中,用户更改其所拥有的文件的权限。
% chmod who operator permissions filename
指定要更改其权限的用户。
指定要执行的操作。
指定要更改的权限。有关有效符号的列表,请参见Table 1–5。
指定文件或目录。
% ls -l filename
在以下示例中,所有者删除了其他用户的读取权限。
% chmod o-r example-file1
在以下示例中,所有者为用户、组和其他用户添加了读取和执行权限。
% chmod a+rx example-file2
在以下示例中,所有者为组成员添加了读取、写入和执行权限。
% chmod g=rwx example-file3