Setting up your website with Unix
Type text in red to reset permissions
Construct your website using U-Drive
- access your U-drive, "connect to server" and type
- smb://csun1.csun.edu/account_name (name of your account)
- You can now drag and drop files into your public_html folder.
- If you do not have a public_html folder, create one on your u-drive just as you would on a local drive
- Place an html file called index.html in your public_html folder. This will be your home page. All other pages should be in folders that have descriptive, but brief names (no spaces in names
Test your website using your browser
- In your browser, type http://www.csun.edu/~account_name
- If you get "Access denied, you will need to reset the priveleges using the process described below.
Set priveleges using terminal software (These steps are necessary only if you receive "Forbidden" or "Access Denied" messages when trying to access your page on the Internet)
(1) Access your account in Unix using terminal software.
Open terminal software
ssh csun1.csun.edu -l login(in the command line of a web browser - this opens telnet or terminal)
enter your CSUN account login and password
type ll to see "long list" or directory; type pwd to reveal path.
Note: Once you login to your account, you can move to other accounts you may own (e.g. cd ~sed619) . pwd reveals the path to your account.Note: Once you are in your account, you can access other accounts by using the following commands
cd
cd ~your_accountNote: You can also access your account from a terminal program using ssh
ssh userid@towhee.csun.edu(2) Create a public_html directory if one does not exist
cd Insures that your are in the home directory
mkdir public_html Creates your public_html (website) folder
(3) The file protections on the actual home directories need to be changed to allow global access for the world. Substitute your account number (login) where it says acctnum below.
cd Insures that your are in the home directory
chmod 711 will make your home directory executable to everyone, a step that is needed to make your site available.
ls -ld To obtain current status of protection rights (e.g. drwx--x--x )(4) By default, only the account owner (you) can read, write or execute files in your account. If you receive a "Forbidden" message when trying to access a file on the web, it indicates that the owner has not granted you read and execute privileges.
chmod 755 public_html
chmod -R o+rx public_html
This changes the mode (chmod) of all files (-R) in your web site (public_html) so that others (o) have read (r) and execute (x) privileges. The command can be more specific. For example, chmod -R o+rx public_html/documents would simply update the privileges for all files in the document directory.
- change directory: cd e.g. cd/public_html
- remove directory: rmdir e.g. rmdir/public_html
- long list: ll
- short list: ls
- disk space quota: quota -v
disk usage du: du -k (gives disk space in 1024 K bytes)