undcemcs02.und.edu
.public_html
” under the root directory.mkdir
:
shell> mkdir ~/public_html
where the symbol ~
is the user’s root in the Linux file system.
chcon
.undcemcs02
.
Otherwise, your CGI scripts will not work.
shell> chcon -R -t httpd_sys_script_exec_t /home/“USER.ID”/public_html
Swap out “USER.ID” with your login name:
shell> chcon -R -t httpd_sys_script_exec_t /home/first.lastname/public_html
public_html
directory.
An example script is ~/public_html/test.html
.chmod
:
shell> chmod 755 ~/../user.id shell> chmod 755 ~/public_html/ shell> ls -all ~user.id/public_html/ total 104 drwxr-xr-x 2 userid cslinux 4096 Jan 5 2017 ./ drwxr-xr-x 67 userid cslinux 4096 Mar 13 2016 ../ -rw-r--r-- 1 userid cslinux 4854 Nov 20 2014 a.out -rw-r--r-- 1 userid cslinux 5977 Jan 5 2017 index.html -rwx------ 1 userid cslinux 227 Nov 20 2016 test.html shell> chmod 755 ~user.id/public_html/test.html shell> ls -all ~user.id/public_html/ total 104 drwxr-xr-x 2 userid cslinux 4096 Jan 5 2017 ./ drwxr-xr-x 67 userid cslinux 4096 Mar 13 2016 ../ -rw-r--r-- 1 userid cslinux 4854 Nov 20 2014 a.out -rw-r--r-- 1 userid cslinux 5977 Jan 5 2017 index.html -rwxr-xr-x 1 userid cslinux 227 Nov 20 2016 test.htmlwhere
user.id
is your Linux account identifier.
public_html
directory.
~/public_html/test.html
,http://undcemcs02.und.edu/~user.id/test.html
public_html
is not in the address.
The fool doth think he is wise, but the wise man knows himself to be a fool. ― William Shakespeare, As You Like It |