User Tools

Site Tools


web:webpublish:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
web:webpublish:start [2017/01/30 10:45] jasweb:webpublish:start [2017/01/30 12:57] (current) jas
Line 1: Line 1:
-====== Web Publishing Pages ======+====== Publishing Web Pages ======
  
 All local users may use our web server to publish pages. The directory "www" in your home directory corresponds to the URL: All local users may use our web server to publish pages. The directory "www" in your home directory corresponds to the URL:
Line 5: Line 5:
 http://www.eecs.yorku.ca/~name/ http://www.eecs.yorku.ca/~name/
  
-where name is your login name. Any file you place in this directory is accessible from this URL. For example if you create a file called "~name/www/info.html", it would be accessible from the following URL:+... where name is your login name. Any file you place in this directory is accessible from this URL. For example if you create a file called "~name/www/info.html", it would be accessible from the following URL:
  
 http://www.eecs.yorku.ca/~name/info.html http://www.eecs.yorku.ca/~name/info.html
  
-The www.eecs.yorku.ca web server runs as a user "www".  It must be given access to read files that you wish to publish on the web.  Your web folder must have the "execute" or "search" bit sit for "other", and your file must be readable by other For example:+The www.eecs.yorku.ca web server runs as a user "www".  This user has no special system privileges.  In order to allow the web server to display your file, you must allow it to access your home directory, your "wwwdirectory, and your file. 
  
-  chmod o+x $HOME $HOME/www +For the web server to be able to access your www directory, both your home directory, and your "www" directory must have the "execute" bit set for "other" Set the execute bit on your home  and www directories like this:
-  chmod o+r ~name/www/info.html+
  
-NOTE: The "execute" bit is set for "other" when your account is created.+  % chmod o+x ~name ~name/www 
 + 
 +The "execute" bit may already be set for your home directory and your www directory.  You can use the ls command to check.  For example: 
 + 
 +  % ls -ld ~name 
 +  drwxr-x--x. 9 user user 4096 Dec 22 23:18 /home/user 
 + 
 +Here you can see that the permission for "other" (the third set of permissions) is "--x" The execute bit is set on this directory, and hence the web server has access to it. 
 + 
 +The web server must also be able to read your file: 
 + 
 +  % chmod o+r ~name/www/info.html
  
 If you are using CGI scripts you will also need to set permissions appropriately. See the CGI script documentation for more information on this.  If you are using CGI scripts you will also need to set permissions appropriately. See the CGI script documentation for more information on this. 
  
web/webpublish/start.txt · Last modified: 2017/01/30 12:57 by jas