Permissions

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: William Lindley
Date:  
Subject: Permissions
The Execute bit on a Directory determines whether you can list the
contents of that directory.

The Execute bit on a File determines whether a shell will allow you to
"run" the contents of the file. Note that you may still be able to run a
program whose execute bit is not set:

   $ ls -l
   total 4
   -rw-r--r--    1  Dec 16 09:49 myprogram.pl
   $ ./myprogram.pl
   bash: ./myprogram.pl: Permission denied
   $ perl myprogram.pl
   Hello, world!
   $


The shell won't execute the myprogram.pl file, but Perl can read it and
execute it.

$ chmod u+x myprogram.pl
$ ./myprogram.pl
Hello, world!

Now the shell will also let you execute it.

\\/
http://www.wlindley.com