How to set umask in UNIX in a way that default fil

2019-09-06 11:12发布

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.

标签: unix umask
1条回答
孤傲高冷的网名
2楼-- · 2019-09-06 11:34

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

查看更多
登录 后发表回答