*nix Thread, Odd User Error from Apache2 in Technical; OK We have a very odd error on an Ubuntu Server for students developing websites and programming using PHP/MySQL and ...
-
9th November 2012, 09:13 AM #1
Odd User Error from Apache2
OK We have a very odd error on an Ubuntu Server for students developing websites and programming using PHP/MySQL and vsftpd to upload.
A student can upload his work.
Going to the correct URL: http://10.10.1.50/~username
Returns the error: You don't have permission to access /~username on this server.
Searching the net gave a number of options including using chmod 777 which is silly but in desparation I tried it to no avail.
The class has 22 students all of whom were created at the same time, all of whom work except this one user. No odd characters in file names, user name etc, member of all same groups and so on.
I'm a little frustrated and confused to say the least.
I did check the error log:
[Thu Nov 08 15:26:03 2012] [error] [client 10.10.1.10] client denied by server configuration: /home/username/public_html/
[Thu Nov 08 15:37:02 2012] [error] [client 10.10.1.10] client denied by server configuration: /home/username/public_html
Any Ideas?
Thanks in Advance.
Dave
Last edited by demsley; 9th November 2012 at 09:20 AM.
-
-
IDG Tech News
-
9th November 2012, 09:28 AM #2 Whats in your config file for the site? Under /etc/apache2/sites-available/default (or any other name you have given this file)
-
-
9th November 2012, 09:30 AM #3 Indeed, post your relevant apache configuration sections.
-
-
9th November 2012, 09:51 AM #4 is the user folder chmod,chgrp,chown (ed) the same as the other user folders.
Rob
-
-
10th November 2012, 12:56 PM #5 
Originally Posted by
twin--turbo
is the user folder chmod,chgrp,chown (ed) the same as the other user folders.
Rob
Yes, the groups etc are correct - well same as the others that all work anyway ;-)
Will check the config files on monday and post.
Thanks
Dave
-
-
10th November 2012, 01:02 PM #6 One thing that might be worth checking, as I fell into this when mucking around before, is do you have any additional security modules loaded? Some of them (e.g. Anti-DOS modules) will go a bit nuts and block access if a website is trying to pull too much at once.
Might be worth trying just to put a bog standard test page up to try to see if you can access that, rather than an all signing/dancing page. Just in case whatever is on there work is tripping something.
Might be nothing, but worth a shot for what takes a few seconds 
Steve
-
Thanks to Steve21 from:
demsley (21st November 2012)
-
10th November 2012, 05:10 PM #7 I *think* apache defaults disable user dirs from working properly until you turn them on, having a good now for the note I spotted.
-
-
15th November 2012, 09:25 AM #8 Hi Guys, I was off earlier this week. Here's /etc/apache2/sites-available/default. I'm unsure as to how this might be affecting this individual user as all the other users (24 of them) all work. I'm a newbie with Apache so I'd appreciate an explanation as well as a solution if you can spare the time for that.
Any advice greatfully accepted.
Cheers
Dave
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
-
-
15th November 2012, 10:06 AM #9 That configuration section is not relevant to mod_userdir configuration. Please post the correct section.
Last edited by Geoff; 15th November 2012 at 10:13 AM.
-
-
15th November 2012, 12:48 PM #10
-
Thanks to ZeroHour from:
demsley (21st November 2012)
-
29th November 2012, 10:32 AM #11 Hope this is the right mod you need to see.
I've looked in /etc/apache2/mods-enabled and the userdir.conf looks OK to me, from what I can find. Both have 777 permissions which looks odd to me. Also they are gree rather than cyan in the listing which I think means they are the files themselves as opposed to symbolic links?
userdir.conf contains this....
<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
</IfModule>
and userdir.load contains....
LoadModule userdir_module /usr/lib/apache2/modules/mod_userdir.so
The file listed in there does exist and has 644 permissions.
Again very confused why it would work for 23 students but not this one.
Cheers
Dave
Last edited by demsley; 29th November 2012 at 10:35 AM.
-
-
29th November 2012, 11:22 AM #12 The users public_html folder is missing or unreadable by the webserver.
-
Thanks to Geoff from:
demsley (7th December 2012)
-
7th December 2012, 11:54 AM #13 Thanks for this but I'm not sure why. The folder ,and all files within, have 755 permissions.
-
-
7th December 2012, 12:03 PM #14 SELinux on ?
tail your /var/log/messages
-
-
7th December 2012, 12:19 PM #15 If you think it is SELinux you can temporally put it into permissive mode to check.
-
SHARE: 
Similar Threads
-
By everton4europe in forum Wireless Networks
Replies: 5
Last Post: 18th July 2008, 12:29 PM
-
By Wiseman82 in forum Scripts
Replies: 6
Last Post: 29th February 2008, 12:03 AM
-
Replies: 28
Last Post: 25th November 2006, 10:09 PM
-
By Disease in forum Gaming
Replies: 30
Last Post: 24th November 2006, 08:33 AM
-
By NetworkGeezer in forum Scripts
Replies: 3
Last Post: 16th November 2006, 09:55 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules