Re: chmod translations

by "Jeanne A. E. DeVoto" <jaed(at)jaedworks.com>

 Date:  Sat, 3 Jun 2000 18:33:54 -0700
 To:  Karen Stafford <webmaster(at)noteworthydesigns.com>,
HWG Techniques <hwg-techniques(at)hwg.org>
 In-Reply-To:  noteworthydesigns
  todo: View Thread, Original
At 2:55 PM -0700 6/3/2000, Karen Stafford wrote:
>Is there a resource that "translates" chmode commands into what's used
>on WS_FPT? For instance, in configuring cgi scripts from Matt's Script
>archive, he gives directions on chmoding by using numbers. WS_FPT just
>has the choices of read/write/execute by server, etc.

Chmod takes three numbers. The first is owner permission (what the owner of
the file is allowed to do), the second is group permission, and the third
is world permission (what any user is allowed to do).

Each of these three numbers is the sum of one or more of 1 (which is
"read"), 2 ("write"), and/or 4 ("execute"). For example, a file that has
chmod 755 has:
  - owner permission is 7 = 1 + 2 + 4 (owner can read, write, and execute)
  - group permission is 5 = 1 + 4 (group can read and execute but not write)
  - world permission is 5 (same as group)
A file with 600 permission would be readable and writeable by the owner,
but not executable, and no one else would be allowed to do anything with
it. A file with 740 permissions could be read, written, or executed by the
owner, executed by a group member, but other users wouldn't be allowed to
do anything with it. You get the idea.

For directories, 4 means "traverse/go inside the directory" instead of
"execute" (directories can't be executable files, after all). Otherwise the
permissions are the same for files and directories.

--
jeanne a. e. devoto ~ jaed(at)jaedworks.com
http://www.jaedworks.com

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA