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.
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.