There are two basic ways to post webpages: manually
by copying files to /stage/www-me/courses/... or through a webpage
composer like Netscape Composer. Regardless of the method you choose,
you are responsible for managing the file permissions.
Don't assume that files posted by a webpage composer automagically
have the correct permissions; in most cases, they do not. Also,
beware of copying files from Macintosh or Windoze platforms. Often,
these transfers make text files executable and unwriteable by the
group.
Group Management
Groups are UNIX's way of allowing users to share files in the
most secure way possible. Each file has an owner and a group. By
default, the group is the group of 1, the owner of the file. Each
file has access permissions for the owner, the group, and other.
By default, any file you create is writeable by the owner only.
Thus, you have to change the group and group permissions to effectively
share files.
A convenient script, chwebp, is available that will set the correct
group and file permissions for files that you create or edit and
plan to post as a webpages. Here is the usage
unix% chwebp -g group-name file|directory
As an example, say you are a TA for ME3201 whose webpages live
in /stage/www-me/courses/me3201. You have just created a new file
called "hwk4.html". To update the permissions you would type
unix% chwebp -g me3201 hwk4.html
where "me3201" is the name of the group. If you create a bunch of
files or if you want to make sure the permissions are correct for
an entire directory tree, you can type
unix% chwebp -g me3201 *
The script will automatically descend sub-directories.
The Nitty-Gritty of Group Management
Here is an example listing (ls -l) of the ms5101 directory in /stage/www-me/courses/,
unix% ls -l
drwxrwxr-x 2 web ms5101 2048 Jan 09 1998 ms5101/
^^^^^^^^^ ^^^ ^^^^^^ ^^^^^^
||||||||| owner group directory name
|||||||||
|||||| the rwx bits for "other"
||||||
||| the rwx bits for "group"
|||
the rwx bits for "owner"
Note that "web" owns the file. The directory
belongs to the "ms5101" group. The first three rwx bits refer to
"owner," the next three to "group," and the last three to "other."
These are the permissions given to the directory. The above listing
shows that the ms5101 directory is readable (r), writeable (w),
and executable (x) by the owner and the group (rwx). It is only
readable and executable by other (r-x). Under no circumstances
should any file or directory you manage be other writeable (ie.
have rwx as the last three bits).
By default files and directories are part of group "user" and
writeable only by the user. In order to make the files read/writable
by the group you will need to 1) change the group and 2) change
the group permissions.
To change the group name,
unix% chgrp groupname file|directory
To make a directory read/writable by the group,
unix% chmod 775 directory
To make a file read/writable by the group,
unix% chmod 664 file
Please refer to the manpages for more info on options available for
chmod and chgrp.
Questions? Contact web@me.umn.edu
|