Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 am putting some scripts in ~/bin and am wondering what appropriate file permissions are. To extend my question somewhat, what permissions make sense for */bin folders all over my system, and why?

share|improve this question
up vote 4 down vote accepted


  • they are writable by the owner (root for /bin, /usr/bin, ...)

  • they executable and readable by everyone else

But your question should instead be:

  • who should be able to modify the directory?

  • who should be able to read the content and execute the binaries?

Once you answer these questions the permissions are straightforward.

An example:

$ ls -ld /bin /usr/bin /usr/local/bin ${HOME}/bin
drwxr-xr-x     8 corti  corti    272 Apr 11  2011 /Users/corti/bin
drwxr-xr-x    39 root   wheel   1326 Jul 21 19:37 /bin
drwxr-xr-x   948 root   admin  32232 Oct 10 08:36 /opt/local/bin/
drwxr-xr-x  1205 root   wheel  40970 Oct  5 09:01 /usr/bin
share|improve this answer

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.