University of Delaware

Making Files Transferred to UNIX Accessible

Many FTP programs make the transferred files readable and writeable by others. Below are listed ways to change the accessibility of files on UNIX.

To let other users read your UNIX files:

  1. Log on to your UNIX (composer) account.
  2. Make your home directory executable to others by typing
              chmod go+x .
    and pressing RETURN. Note the period (.) at the end of the command. You only need to issue this command once.
    If the file you want others to read resides in a subdirectory on your account, switch to that subdirectory and make it executable:
              cd directoryname
              chmod go+x .
    Execute this command for all subdirectories between the home directory and the subdirectory in which the file(s) is stored.
  3. To allow read access only to a file, type
              chmod go+r-w filename
    and press RETURN.
    You can use wildcards to specify a group of files, such as all files with the extension ".dat":
              chmod go+r-w *.dat

Example:

Given the directory structure (subdirectories are shown in bold, filenames in italics):
use the following commands to allow access to the file "fall98":
          cd
          chmod go+x .
          cd project1
          chmod go+x .
          cd reports
          chmod go+x .
          chmod go+r-w fall98

To protect your files from being read by other users:

  1. Log on to your UNIX (composer) account.
  2. If necessary, switch to the subdirectory in which the file(s) resides:
              cd directoryname
  3. To prohibit access to a file, type
              chmod go-rw filename
    using wildcards when appropriate, and press RETURN.

Example:

Given the above directory structure, restrict access to the ".txt" files in the "project2" subdirectory with the following commands:
          cd project2
          chmod go-rw *.txt


IT Help Center
Questions or Comments
University of Delaware Home Page
Last updated: September 21, 2004
Copyright © 2003-2004 University of Delaware