File Permissions

File permission errors are corrected using a terminal or right-click menu
Error 403 means the file
is on the server but not readable or executable;
it is forbidden.

If, when viewing a file in the browser, an error message 403 Forbidden appears that says the page cannot be viewed or it is only ‘writable’, then the file or its parent folder has a permission problem. Learn more about error numbers.

Solve the problem

Use the following method to change the directory/folder and/or file permissions on the ONID web server using a terminal application and Unix commands.

Launch a Terminal Application

  1. For Mac computers, search for and launch the Terminal application.
  2. For Windows install Windows Terminal (Preview) application (requires a Windows account) or MobaXTerm application (green button).
  3. File → New Terminal.

Type Unix Commands into the Terminal

    • For MobaXterm or other similar terminal applications, type and your ONID username into the fields provided in the SSH area.
      Type the shell address and onid username into the fields.
    • Type ssh -l **
      Replace ** with your ONID user name.
      Connect to the ONID web server using Shell. Authenticate then change the directory list to public_html
  1. Type your ONID password.
  2. Type the number 1 to indicate that you accept the Duo push to your phone or other Duo 2-factor authentication device.
  3. Type ls to list all of the ONID folders.
  4. Type cd public_html to change to the public directory,
    then type ls to view its list of folders and files.
  5. Type chmod 755 **.
    Replace ** with your filename (copy the name and paste it to avoid making typos).

    Terminal chmod file permissions change
Test the solution
  1. From a browser, view the folder/file you changed to ensure the permissions were changed on the server.
    Replace USERNAME with your ONID username.
  2. If you get any other errors, consult the instructor. Provide the Error number and any text on the screen.
  3. If the images folder that you transferred to the web server does not show up, then use the same process above to update the folder and file permissions.
  4. If the file shows up, hurrah! Copy the URL from the address bar to submit the assignment.