cancel
Showing results for 
Search instead for 
Did you mean: 

file permision

edi_4
Advisor

file permision

Hello! Does anybody know how to set default file permision to 777. When I create a file it gets default permision 666. Thanks
3 REPLIES
Venkatesh BL
Honored Contributor

Re: file permision

You can change the permission of an existing file using 'chmod' (chmod 777 file1)

If you want to apply a permission for all new files, use umask ('man umask' for more info).

Generally, setting '777' as permissions to files is not a good practice.
edi_4
Advisor

Re: file permision

Thank you - I need 777 only to one directory. I know I can use chmod, but from default the file is created with 666. Using umask does'n change to 777 (i need ecexute). where can I change default permisions for files.
Ivan Ferreira
Honored Contributor

Re: file permision

Files by default won't get 666 permisions unless they are a binary file generated as the result of a compilation. So, when you create a regular file, the maximum permissions that you will get for that file is 666 even when umask is 000. You must manually change the permissions for regular files to 777.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?