Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
具体来说,我需要给文件 rw----r-- 和 dirs rwx--xr-x
使用umask 062.
umask 062
这是有效的,因为umask只有取消设置位,并且文件通常不会首先使用设置的可执行位创建:
umask
$ umask 062 $ touch myfile; mkdir mydir $ ls -ld myfile mydir drwx--xr-x 1 user user 0 Dec 5 15:21 mydir -rw----r-- 1 user user 0 Dec 5 15:21 myfile