UD Home Find It Site Map UD Directories UDaily

Checking protection codes for your UD web page


For everyone to see the files in your web directory, they must be protected such that

  • Your home directory is at least executable by everyone.
  • Your WWW directory is readable and executable by everyone.
  • Individual files are readable by everyone.
Log in to your UNIX account and follow these directions:

1. Use the UNIX "cd" command to change to your web directory.

  • If your files are in your personal directory, type
      cd public_html
  • If your files are in the Registered Student Organization directory, type
      cd ~www/docs/stu-org/directory_name
  • If your files are on the central web server, type
      cd /www/htdocs/directory_name
2. At the UNIX % prompt, type ls -al. You should see a display like this one:

drwxr-xr-x 2 13355 1024 Sep 19 14:04 .
drwx--x--x 20 13355 3072 Sep 19 12:51 ..
-rw-r--r-- 1 13355 1151 Jul 18 13:00 bullet2.gif
-rw-r--r-- 1 13355 910 Aug 29 11:39 gold10.gif
-rw-r--r-- 1 13355 23934 Sep 19 09:41 index.html
-rw-r--r-- 1 13355 3580 Jul 23 13:45 mugshot.gif
-rw-r--r-- 1 13355 5796 Sep 19 12:55 resume.html

The first column indicates the protection setting for each item. The second, third and fourth characters of the protection setting refer to your access privileges; the fifth, sixth and seventh characters refer to the access privileges of people in a common group or project; and the last three characters of the protection setting refer to others' access privileges.

3. The current directory is represented by a single period. If your current directory's protection settings are different from "drwxr-xr-x" or "drwx---r-x", make it executable and readable by others. At the UNIX % prompt, type

chmod o+rX  .
and press the ENTER key. Note that a space and a period (.) follow the "o+rX" characters.

4. Your home directory is represented by two periods. Its protection setting ordinarily should be "drwx--x--x," "drwxr-x--x," "drwx-----x" or "drwx---r-x." To make your home directory executable by others, at the UNIX % prompt, type

chmod o+x  ..
and press the ENTER key. Note that a space and two periods (..) follow the "o+x" characters.

5. Any file that you want the world to see should have a protection setting of "-rw-r--r--", or "-rw---r--". To make your "filename.html" file readable by others, at the UNIX prompt, type

chmod o+r,g-w  filename.html
and press the ENTER key. If other files need to have their protections reset, replace "filename.html" with those filenames or use wildcards:
chmod o+r,g-w  *.html
chmod o+r,g-w  *.gif
chmod o+r,g-w  *.jpg

Copyright © University of Delaware 2001-2004
Last Updated: September 7, 2004