Beruflich Dokumente
Kultur Dokumente
It is VERY
different from DOS/Windows, if you are new to *NIX or always wondered what "drwxr-
xr-x" meant read on.....
All the gobblygook at the beginning of each line is the file permissions. Note: To
*NIX, directories are just special files. In order to allow someone to 'traverse'
the directory tree, the user must have eXecute permissions on the directory even
if they have read/write privileges.
Within each set of permissions (you, group, world) there are three permissions you
can set: Read - Write - Execute. Therefore when you set the permissions on a file
you must take into account 'who' needs access.
Here's a stripped down list of the options chmod takes: (for more info do a man
chmod at the command line.)
-R is optional and when used with directories will traverse all the sub-
directories of the target directory changing ALL the permissions to ###. Very
useful but use with extreme caution.
Of course you need a file name or target directory. Wild cards * and ? are
acceptable. If you don't supply the -R, with the target directory, the directory
itself will be changed, not anything within it.
Again you must supply the #'s in a set of three numbers (you, group, world).
To make a file readable and writable by you, and only read for your group, and no
access from the world,it would look like:
To make all files that end in .cgi read-write-executable for you, and read-
executable for everyone else:
[This is a gross approximation, a place to start. Your sysadmin maybe really loose
with permissions or a really tight-butt. Your mileage *will* vary.]
If the web server is running within the same group as you....Most Perl Scripts
should be set to 750. Most HTML files should be set to 640. And most data files
that must be written to by a web server should be 660. The standard directory
permissions should be 750. Directories that must be written to by a web server
should be 770.
Your home directory should be 700. If you are operating a ~username type server,
the public_html directory should be 777. (You may also need to open up the home
directory to 755.)
Side Note: any file name that starts with a '.' is invisible to the webserver when
a directory list is generated. This is a quick and dirty way to hide a file.
Mutated into a life-size Dilbert doll, Anthony spends the days wedged into his
replica of Cardinal Fang's Comfy Chair coding solutions to the most thorny of
internet software problems.
4 comments on this article. Log in to add your comment | Rate this article: Rate
this node 1 star.Rate this node 2 star.Rate this node 3 star.Rate this node 4
star.Rate this node 5 star.