问题
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