PDA

View Full Version : Helpful UDot Account Tip


jonathaw
11-23-2004, 03:22 PM
Here's something the nice gentleman at 621-HELP told me which could be useful for helping people get started on their udot account.
I was helping a lady upload a very simple webpage for a class. She had her account activated and all that jazz, but it gave us a 403 error (Forbidden!) when we went to her account on the web. All of her permissions seemed to be correct, but it still gave us this error. Solution:
SSH into the account using the Shell client (not the file transfer one) and type in "wwwaccess" and hit return. You should get a confirmation of public_html settings and the page will now load correctly.

fischerm
11-23-2004, 10:22 PM
The entire path leading up to the file has to have execute permissions on the directories. By default the user's home directory has permissions of:
drwx------ 3 fischerm student 2048 Sep 15 15:15 .
which only allows the owner to do anything. If you look inside the wwwaccess script, you can see what it does.
pico /usr/local/bin/wwwaccess

#!/usr/local/bin/perl
#
# Set access permission for public_html directory and files
#
# Modified to take off extreme write permissions -- B.Murphy 19980916
#
$HOME = $ENV{'HOME'};
unless (-e "$HOME/public_html") {
print "You don't have a public_html directory. No action taken!\n";
exit;
}
system("/bin/chmod a+x,go-rw $HOME");
system("/bin/find $HOME/public_html -type d -exec chmod a+x,go-w {} \";\"");
system("/bin/find $HOME/public_html -type f -exec chmod a+r,o-w {} \";\"");
print <<"EOB";
Your access permissions have been set:
Home directory and public_html directory: \"execute\"
Files within public_html: \"read\"
Any subdirectories within public_html directory: \"execute\"
EOB


Anyhow, that's why it wasn't working, and that's what udot's wwwaccess script fixes!