Command Description
------- -----------
chmod go+r filename Adding read access to group and others.
chmod go-r filename Removing read access to group and others.
chmod a+rx filename Adding read and execute permission to
all (a = ugo).
chmod go-rx filename Removing read and execute permission to
group and others.
chmod go+rx directory Adding read and execute access to group
and other.
chmod go-rx directory Removing read and execute access to
group and others.
To allow other people access to the contents of your file or directory, the permission fields associated with that file or directory must be manipulated. There are three basic levels of permissions you can assign and three designations of people who can be given access to them. By default, all of your files are created with protections that disallow anyone else on the system from accessing them. To see the current settings for your files, use the command "ls -lg". The ls command lists files, the (l) option offers the long format and the (g) option includes group names. Here's a sample output from this command:-rw-r--r-- 1 mer staff 1551 Nov 4 14:32 notes
-rw-rw---- 1 mer staff 95 Oct 15 17:33 agenda
drwxr-xr-x 2 mer staff 512 Nov 5 19:54 shipping
The permission field consists of the ten bits (-,d,r,w) that appears in the far left column. The first bit indicates whether it is a file (-) or a directory (d). In the ls output above, for example, there are two regular files and one directory. The next nine bits consist of three sets of the three permission types, one set for each of the three types of people.* the permission types are read (r), write (w), and execute (x)
* the people types are user (u), group (g), and other (o)Using the sample output for the ls command, above, mer is the owner of the two files and the one directory and she, the user (u), has read and write permissions for all three. She belongs to the staff group, and she has given read (r) permissions to everyone else in the staff group for all three, as well as write (w) permission for the agenda file. All other (o) users have read access to the notes file and the shipping directory, but are denied permission to access the agenda file. Note the execute (x) permission must be given for directories to allow access to the particular person type.
read, write, execute for user (u) | | read, write, execute for group (g) | | | | read, write, execute for others (o) | | | -rwxrwxrwx Use the chmod command to add (+) or remove (-) read (r), write (w) or execute (x) permissions for you, the user (u), members of your group (g), or others on the system (o). A simplified version of the chmod command format is:
chmod [ugoa]{+|-}[rwxs] file
The command chmod works in two modes, absolute and symbolic. The brief overview we offer here describes the symbolic mode. Please see the man page for more sophisticated use of this command. Adding read access to group and others: chmod go+r filename
Removing read access to group and others: chmod go-r filename
Adding read and execute permission to all (a = ugo): chmod a+rx filename
Removing read and execute permission to group and others: chmod go-rx filename
When you modify a directory's permissions be careful to allow execute permission, as this is necessary for the directory to be used properly.Adding read access to group and others: chmod go+rx directory Removing read access to group and others: chmod go-rx directory If you have purchased a Corporate Account, Home Page Alone or Kiosk Pages Service, you may be interested in setting the user or group set-ID bit on the directory used by the service. The s option, when turned on for user or group, will set the default group for all new files in that directory. Once it has been set, any file created in that directory will belong to the group that the directory belongs to. The UNIX command 'umask' will allow you to modify the default file protections which your account uses. To understand this command you must be familiar with the absolute modes which are fully described in the man page for chmod.
HOME Top of Help Desk Eye On The World The World Kiosk
For further assistance, please send an email
request to support@world.std.com
Copyright 1995 Software Tool & Die, Inc. All Rights Reserved.
Software Tool & Die, Inc., 1330 Beacon St. Suite 215 Brookline, MA 02146