Department Logo Information Services and Technology

Upload a File

To upload files using PHP or JSP, or in general to modify the contents of a sub-directory of the public_html directory in your login directory, you must grant permission to the user under which the Web server runs to write into that sub-directory. If that sub-directory is to be called "UPLOADS", then do this:

mkdir ~/public_html/UPLOADS

fs sa ~/public_html/UPLOADS http write

    where fs = /usr/afsws/bin/fs (Unix or Linux)
  
Then, in your PHP or JSP code, specify that files be uploaded to </full/path/to/UPLOADS>

Note: For CGI applications, relpcace the AFS user "http" above with "cgiuser". E.g., "fs sa ~/public_html/cgi-bin/some.dir cgiuser write".