Skip to content
Advertisement

Unable to create a 777 file on Linux [closed]

How can I create a file (not directory) with execution permissions using umask? I know files use 666 permissions and directories 777 but I want to create files with 766, for example.

Advertisement

Answer

Use chmod to change the file permissions.

chmod 777 some-file

Or set the umask

umask 000
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement