Anonymous FTP at SLAC

SLAC 2 March 2011

Anonymous FTP on the central UNIX system at SLAC permits SLAC users and non-SLAC collaborators to exchange files easily. Authorized SLAC UNIX users can store files in FTP space so that collaborators without a SLAC UNIX account may retrieve them. Similarly, file space exists where collaborators without a SLAC UNIX account may store files for SLAC users.

The rest of the page gives the procedures for two tasks:

  1. Outgoing anonymous FTP: A SLAC user makes a file(s) available in anonymous FTP space, and a collaborator retrieves the file(s).
  2. Incoming anonymous FTP: A collaborator leaves a file(s) in anonymous FTP space, and a SLAC user retrieves the file(s).

Note: The following discussion assumes familiarity with the UNIX ftp command. Give the UNIX command man ftp for more information about the ftp command.

Outgoing Anonymous FTP

A SLAC user copies files to FTP space

  1. Make sure that you have a UNIX account because the directories in which you will be making files available to your collaborators will be in the UNIX AFS file system. Even if you normally work in Windows, you will need a UNIX account to access this space.
  2. Decide which of three subdirectories is appropriate for storing your file(s):
  3. You will need to have a subdirectory created that reflects your UNIX username, your groupname, or the name of the software unless such a subdirectory exists. If the subdirectory exists, you will have to have access privileges for this subdirectory; these can be provided by the group owner. Examples of existing subdirectories include: If you need to have a subdirectory created, fill out an AFS space request. Specify which subdirectory (users, groups, or software), the name of the subdirectory you want to be created, and the amount of disk space you need if it is more than the default 5 MB.

    Note: If needed, you can add additional subdirectories under the subdirectory created by unix-admin. You will have all AFS file access privileges, except administrator privileges, for any subdirectories you choose to create. See the AFS Users' Guide for more information.

  4. Copy or move your files to the appropriate subdirectory using the UNIX cp or mv commands, respectively. You may also use ftp to copy files to this space, but there is one special consideration. Your login will place you by default in your AFS home directory, and you must use the cd command to change to one of the public paths listed in point 3.
  5. Notify the collaborator(s) of the name(s) and location of the file(s).

The collaborator FTPs files from SLAC

The SLAC person has notified the collaborator of the subdirectory and filename, and the collaborator now wants to transfer the file. For example, collaborator Ann wants to transfer the file calibration.dat from her SLAC colleague Bill. Assuming Bill has placed the file in users/bill, Ann can login to SLAC's FTP site to retrieve the file with the following commands (shown in bold):

ftp ftp.slac.stanford.edu
Name: anonymous
Password: ann@hep.physics.edu
(the password will not display on screen)
(At this point you are in the directory '/afs/slac/public' although pwd returns '/'.)
cd users/bill
binary (assuming that the data format is binary; the default is ascii)
get calibration.dat (mget if it were a group of files)
quit

Of course, if the collaborator has access to AFS at SLAC, instead of using anonymous FTP, he or she may simply cd to /afs/slac.stanford.edu/public/users, /afs/slac.stanford.edu/public/groups, or /afs/slac.stanford.edu/public/software and copy in the file.

Incoming Anonymous FTP

The collaborator FTPs a file to SLAC

The subdirectory incoming has been reserved for collaborators who want to send files to SLAC users. For example, assume that Ann wants to transfer the file cheptalk.ps to SLAC user Bill.
WARNING: Files are automatically expired from the incoming directory after three days. If Bill does not retrieve the file within that time it will be deleted.
  1. Bill must have a UNIX account.
  2. Ann can create a directory to contain her file and transfer her file to with these commands:
    ftp ftp.slac.stanford.edu
    Name: anonymous
    Password: ann@hep.physics.edu
    (the password will not display on screen)
    cd incoming
    mkdir bill
    binary
    (to prevent linend conversions which may damage some files.)
    put cheptalk.ps
    quit

  3. Ann tells Bill that file cheptalk.ps is in subdirectory incoming/bill.

Note: The collaborator can verify that the file(s) has been properly transferred by giving the ls or dir command.

Alternatively, if the sender has access to AFS, he or she may simply cd to /afs/slac.stanford.edu/public/incoming/bill and copy the file.

SLAC user moves file(s) out of FTP space

Bill removes the file with the commands:

Note: Please make sure that files are removed from subdirectory incoming; that's why we suggest you use the mv rather than cp command.


* Although it is possible to write files into incoming directly, OCIO highly recommends that a subdirectory be created to identify who the files are intended for.
Owner: unix-admin