ROHAN Web Server - Permissions for Files/Directories
![]()
**If your ROHAN account was created after January 11, 2008, skip steps 1 and 2, and go directly to Step 3.**
(ROHAN accounts created after January 11, 2008 will automatically have permissions for the home and public_html directories set to 711.)
![]()
After you have:
- Created your web page files
- Uploaded your .html, .cgi, .gif, .jpg, .pdf, etc. files to your ROHAN account
you must set the permissions for your directories and files on ROHAN to make them accessible to everyone.
NOTE: Some FTP packages such as Fetch and SSH automatically set permissions for you, however, permissions for your home directory must always be set via ROHAN.
Step 1: Change the permissions to your home directory.
- Login to ROHAN via SSH with your username and password.
- At the ROHAN% prompt, enter:
% chmod 711 ~
- List your directory to check your permissions. At the ROHAN% prompt, enter:
% ls -laIf the permissions are set correctly, the listing for your home directory will look like this:
drwx--x--x 2 neer neer 512 Sep 19 11:06 .
Step 2: Change the permissions to your sub-directory.
- Continuing from Step 1 . . .
- At the ROHAN% prompt, enter:
% chmod 711 ~/subdir
(where subdir is the name of the sub-directory, i.e., public_html)
- List your sub-directory to check your permissions. At the ROHAN% prompt, enter:
% ls -laIf the permissions are set correctly, the listing for your sub-directory will look like this:
drwx--x--x 2 neer neer 512 Sep 19 11:06 public_htmlStep 3: Change the permissions to all your .html, .gif, .jpg, cgi, etc., files.
- Continuing from Step 2 . . .
- Change to your public_html directory. At the ROHAN prompt, enter:
% cd public_html
- At the ROHAN% prompt, enter:
% chmod 644 *.*
- If you have cgi files, their permissions must be set differently. At the ROHAN prompt, enter:
% chmod 711 *.cgi
- List your files to check your permissions. At the ROHAN% prompt, enter:
% ls -laIf the permissions are set correctly for your .html, .gif, .jpg files, each file will have a listing which looks like this:
-rw-r--r-- 1 neer neer 1025 Jan 2 11:06 index.htmlIf the permissions are set correctly for your .cgi files, each file will have a listing which looks like this:
-rwxr-xr-x 1 neer neer 1025 Jan 2 11:06 myfile.cgi
![]()