CS department server login
Setting Up Your Web Page (simple reference for CS 355)
- Login to your linux account
- Set the proper permissions for the home directory of your linux account.
chmod 701 ~
- Create a folder called public_html in your home directory.
mkdir public_html
- Set the proper permissions for the folder public_html.
chmod 701 public_html
- Create your main page, name it index.html or index.htm or index.php . The name index.html, index.htm or index.php is a special
filename sometimes given to the main web page of a web site.
- Set the proper permissions for index.html
chmod 604 index.html
- Your website URL would be:
http://venus.cs.qc.cuny.edu/~your_username
- If your script contains your MySQL username and password to connect to your database, you should protect your file using the Access Control LIsts (ACLs). For example you want to protect the file, "secret.txt" :
chmod 600 secret.txt
setfacl -m u:apache:r secret.txt
The first comand give the owner (yourslef) to read & write, group and others users have no access to the file secret.txt. The second command sets the permision to allow the web server (apache) to read your file.
- To view/verify your file has been set with a proper ACLs settings:
getfacl secret.txt