file permissions

learninmac

Registered
When I create a new file, for example a text file that contains several commands, the new file is automatically only given read and write permissions. I would like the execute permission to also be automatically assigned. Please advise how I can change this.
Thank you.
 
In the Terminal, do this:
Code:
chmod +x [path/to/filename]
...where [path/to/filename] is the path and filename to the file to which you wish to add the execute bit.

I don't know how to do this automatically for all newly created files... perhaps using umask? I create more non-executable files than executable files, so I wouldn't wish such a thing on my system... but if you create 90% of your files as executables, then I could see this being a necessity.

Here's a simple script that will automatically add the execute bit for any file created in a specific folder:
http://www.macosxhints.com/article.php?story=20070502131117675
 
Back
Top