Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want a way by which whenever I create a new file in a particular directory, I want it to be executable by default.

Is this even possible, if so how?

share|improve this question
This is the easiest to read document regarding ACL (Access Control Lists) I could find: – Rinzwind Oct 1 '13 at 14:42

It depends, how you create the file. If you want strict executable for the creator only, than use:

chmod 100 myfile

If you need read-write access as well:

chmod 700 myfile

A little help:

Automatic creation can be done wuth install (part of coreutils):

install -b -m 700 /dev/null myfile
share|improve this answer
That is not what he wants. He wants it automatic. – Rinzwind Oct 1 '13 at 14:40
Ok, completed my answer. – Frantique Oct 1 '13 at 14:44

You can change permission of a directory using the following command
chmod -R 700 directory

where -R ----> recursively apply permission all sub-directories and files under directory

share|improve this answer
By my understanding, this will mark all existing files as executable, but any new files written after running this will not be. – Kevin Jun 7 '15 at 0:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.