简体   繁体   中英

Can umask be used for special permissions

Is there a way to set special permissions on files and directories during its creation using umask or some other command?

ie if I set umask to 0000, the file permissions will become 0666 and for directories it will be 0777. In any case, default special permissions are not set.

No, it is not possible to set special permissions with umask.

Quoting theArch Wiki: umask :

The suid, sgid and sticky bits of the mask are ignored.

Use chmod to set gid and uid bits.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM