File Permissions

File permission errors are corrected using a terminal or right-click menu
File permission errors are corrected using a terminal or right-click menu.

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

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. Search for and launch the Terminal App on your Mac computer. For Windows, search for PuTTY. You may need to download and install it first.
  2. File → New Terminal.

Type Unix Commands into the Terminal

  1. Type ssh -l ** shell.onid.oregonstate.edu

    Replace ** with your ONID user name.
  2. Enter your ONID password.
  3. Type a 1 to indicate that you accept the Duo push to your phone or other Duo 2-factor authentication device.
  4. Type ls to list all of the ONID folders.
  5. Type cd public_html to change to the public directory and type ls to view its folder and file list.
  6. If you transferred your file already but got the error message, then type chmod 755 about/index.php
    Terminal chmod file permissions change
    Terminal chmod file permissions change
  7. If you want all recursive files and folders to have the same permissions, then type chmod 755 -R about. Replace the about folder name with any other folder name that needs Recursive permissions.

Test

From a browser, view the folder/file you changed to ensure the permissions were changed on the server.

Description, Ordered, and Unordered Lists

So many lists! So many tags!
To help keep them straight, this lesson reviews how they work:

  1. Ordered lists number each item
  2. 1
    2
    3
    4
    5
    <ol>
       <li>item</li>
       <li>item</li>
       <li>item</li>
    </ol>

    Line items must be nested inside the ordered list tag.

  3. Unordered lists bullet each item
  4. 1
    2
    3
    4
    5
    <ul>
       <li>item</li>
       <li>item</li>
       <li>item</li>
    </ul>

    Line items must be nested inside the unordered list tag.

  5. Mixed Nested Lists are made of lists insides lists. The ordered can envelop an unordered list, or visa versa. Child lists are nested inside a parent line item. Note how the line item closes after the child list:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    <ol>
       <li>Parent Item
          <ul>
             <li>Child item</li>
             <li>Child item</li>
             <li>Child item</li>
          </ul>
       </li>
       <li>Parent item</li>
       <li>Parent item</li>
    </ol>
  6. Description Lists are for listing items that need a title and description. The title is flush left and the description is indented:
    1
    2
    3
    4
    5
    6
    7
    8
    <dl>
       <dt>Title of something</dt>
          <dd>description </dd>
       <dt>Title of something</dt>
          <dd>description </dd>
       <dt>Title of something</dt>
          <dd>description </dd>
    </dl>

    Adding anchors to each title helps set off the name of the article as well as makes it easy to hyperlink to that article:

    1
    2
    3
    4
    5
    6
    7
    8
    <dl>
       <dt><a href="" target="_blank">Name of site or article</a></dt>
          <dd>description </dd>
       <dt><a href="" target="_blank">Name of site or article</a></dt>
          <dd>description </dd>
       <dt><a href="" target="_blank">Name of site or article</a></dt>
          <dd>description </dd>
    </dl>

    Don’t use a URL in the Name area between the anchor tags; use only a title.

Include Snippet Files

Include snippet files.

To see how quickly we can incorporate other text from databases and text files,

  1. Use PHP or JavaScript to display text from a text file.
  2. Use PHP or JavaScript to display data from a database.

Empty the Browser’s Cache

Periodically, a site will ‘go down,’ which means the web server hard drive crashed and must be rebooted. While the server is in the process of coming back up, you might see an error messages like “500 Server Error” or a “Database connection error.”

If your browser ‘cached’ these pages instead of serving you the actual site’s pages, clear the cache of the browser 15 minutes or more after the server has come back online

Chrome

  1. In Chrome, click the navicon or toggle menu icon Toggle menu button and choose Settings.
  2. At the bottom of the screen, click Show Advanced Settings…
  3. Click the Clear Browsing Data... button under the Privacy section heading.Clear the cache in Chrome
  4. Choose these four options:
    Clear the cache in Chrome

    • Browsing history
    • Download history
    • Cookies
    • Cached images and files
  5. Then click the Clear Browsing history button.