简体   繁体   中英

How to set umask in UNIX in a way that default file permission is rwx (777)?

I am a bit new to UNIX and I'm trying to cover every aspect of a group of basic commands, including umask .

I have done a lot of research on the internet but haven't found a proper answer so far, I know that files are created by default with a 666 (rw-,rw-,rw-) permission and I know that in order to get the real permissions applied you need to take into consideration the umask .

I would like to know if it's possible to set umask in a way that files are created with a 777 (rwx,rwx,rwx) permission. If not possible with the umask command, then how can I do it?

I already know about chmod but that means using it every time a new file is created, something I don't want.

In short, there is no guarantee you can make that. Longer version in this detailed post: https://unix.stackexchange.com/questions/287278/why-doesnt-umask-change-execute-permissions-on-files

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