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

社会主义新天地 提交于 2019-12-13 07:29:54

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/40684924/how-to-set-umask-in-unix-in-a-way-that-default-file-permission-is-rwx-777

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!