Anonymous FTP

Using anonymous ftp on department systems

Reviewed 5/8/14 by Bil Hays

The department’s anonymous ftp server allows users without a CS account to download and upload files at a specified location on our systems.  We have set up some large disk partitions for this purpose.  Every month we clean out any files in our upload and download directories that are older than 14 days, so this space is not for long-term file storage.  Note also that the incoming and outgoing directories are NOT backed up, so you should keep a copy elsewhere.

Details of our system are discussed below, including views of the anonymous FTP file area, making files available to an outside party,  receiving files from an outside party, and more information.

Views of the anonymous FTP file area

All anonymous FTP operations on our server are restricted to the directory rooted at /afs/unc/home/ftp.  To outsiders connecting as user anonymous, this directory is the ftp root, or ‘/’.  To users inside the department, this directory is accessed in AFS file space at /afs/unc/home/ftp.

Making files available to an outside party

The AFS directory where you can make files available via anonymous ftp is /afs/unc/home/ftp/outgoing.

The directory has 64GB of total space, and it is not backed up.

If you want to make a file available via ftp, create a subdirectory of /afs/unc/home/ftp/outgoing whose name is your user name, e.g., /afs/unc/home/ftp/outgoing/anderegg.

Computer Services recommends that you change the AFS permissions to limit other users’ access to your directory to read/lookup:

fs sa /afs/unc/home/ftp/outgoing/anderegg system:authuser rl

Once you have created the directory and set permissions on it, copy the files you wish to share into the AFS directory you created.  Remote users will access your files by using ftp to connect to ftp.cs.unc.edu.  They should specify “anonymous” as their user name and then give their email address when asked for a password.  The subdirectory you created above will be accessible to them as /outgoing/yourlogin, e.g., /outgoing/anderegg.

Once every 30 days we remove any files in /afs/unc/home/ftp/pub/outgoing that are at least 14 days old, and we remove any directories that are empty.

Receiving files from an outside party

To have a user upload files onto our anonymous FTP server, first create a subdirectory of /afs/unc/home/ftp/incoming whose name is your user name, e.g., /afs/unc/home/ftp/incoming/anderegg.  Remote users will access the directory you created by using ftp to connect to ftp.cs.unc.edu.  They should specify “anonymous” as their user name and then give their email address when asked for a password.  The subdirectory you created above will be accessible to them as /incoming/yourlogin, e.g., /incoming/anderegg.

There are 64GB of space available in the /incoming directory, and this directory is not backed up.

Files uploaded to the departmental FTP server are neither readable (i.e., they can not be downloaded) nor writable for anonymous FTP users after they are placed in the /incoming’ area.  This ensures that our anonymous ftp server cannot be used as a world accessible dropbox.

Once every 30 days we remove any files in /afs/unc/home/ftp/incoming that are at least 14 days old, and we remove any directories that are empty.

More information

Once users connect to the ftp server using ftp, they can type <?><Enter> for information on the available commands.  Information on sftp, whose commands are not quite the same as ftp, is available at the sftp help page and by typing “man sftp” on a UNIX system.