Tux public_html Folder and Public Webpage Troubleshooting

Instructions

You can post public HTML pages on Tux by placing HTML and other related files in the public_html folder in your Tux home directory.

When you ssh into Tux, to see if you have a public_html folder, type in the following command, and then press the Enter/Return key.

ls

If you do not have a public_html folder, type in the following commands, and then press the Enter/Return key after each line.

cd
mkdir public_html
chmod 755 public_html

If you have a public_html folder:

  • Your HTML and other related files and sub-folders or sub-directories should be placed inside the public_html folder.
  • The index.html file within the public_html folder will be the main page or homepage of your CCI or CS website hosted on Tux.
  • To get to this website, navigate to https://www.cs.drexel.edu/~abc123/ in web browser, where abc123 is your Drexel username.
    EXAMPLE: https://www.cs.drexel.edu/~mjg88/
  • Having proble

Troubleshooting

Forbidden or 403 Forbidden

  • "You don't have permission to access this resources." Or something similar.
  • The permissions on the public_html folder, or one or more files inside, may be incorrect.
  • Type in the following commands, and then press the Enter/Return key after each line.

    cd
    chmod -R 755 public_html

  • If this does not help, try what's suggested in the "Not Found or 404 Not Found" section below as well.

"You don't have permission to access this resource. Server unable to read htaccess file, denying access to be safe"

  • See our Forbidden or 403 Forbidden section ABOVE. Sometimes you can accidentally change the permissions on files or folders that you didn't intend to do with the chmod command, or even by using an IDE or text editor, such as vscode or WinSCP or the like. The Forbidden or 403 Forbidden section ABOVE tells you how to resolve this.

Not Found or 404 Not Found

  • "The requested URL was not found on this server." Or something similar.
  • Make sure you type in the web address or URL into your web address bar correctly.
    Example: If you had a file called 2022.txt in your public_html folder, you'd go to:
    https://www.cs.drexel.edu/~mjg88/2022.txt
    Example 2: But index.html files do not need to be specified in the web address or URL.
    https://www.cs.drexel.edu/~mjg88/
  • Make sure you have a public_html folder.
    If the folder is not named public_html, rename the folder.
    Example of how is below, where you have a publichtml folder.
    Type in the following commands, and then press the Enter/Return key after each line.

    cd
    mv publichtml public_html


  • Sometimes, you just need to recreate the public_html folder.
    Back it up first, in case you have files you need in it.
    Then make sure the file permissions are correct.

    cd
    mv public_html backup_public_html
    mkdir public_html
    cp -A backup_public_html/* public_html/
    chmod -R 755 public_html

  • ALSO see our Forbidden or 403 Forbidden section ABOVE. Sometimes you can accidentally change the permissions on files or folders that you didn't intend to do with the chmod command, or even by using an IDE or text editor, such as vscode or WinSCP or the like. The Forbidden or 403 Forbidden section ABOVE tells you how to resolve this.

Please also see: