demsley Posted November 9, 2012 Posted November 9, 2012 (edited) 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 Edited November 9, 2012 by demsley
glennda Posted November 9, 2012 Posted November 9, 2012 Whats in your config file for the site? Under /etc/apache2/sites-available/default (or any other name you have given this file)
Geoff Posted November 9, 2012 Posted November 9, 2012 Indeed, post your relevant apache configuration sections.
twin--turbo Posted November 9, 2012 Posted November 9, 2012 is the user folder chmod,chgrp,chown (ed) the same as the other user folders. Rob
demsley Posted November 10, 2012 Author Posted November 10, 2012 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
Steve21 Posted November 10, 2012 Posted November 10, 2012 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 1
ZeroHour Posted November 10, 2012 Posted November 10, 2012 I *think* apache defaults disable user dirs from working properly until you turn them on, having a good now for the note I spotted.
demsley Posted November 15, 2012 Author Posted November 15, 2012 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 ServerAdmin webmaster@localhost DocumentRoot /var/www Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all 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/" Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128
Geoff Posted November 15, 2012 Posted November 15, 2012 (edited) That configuration section is not relevant to mod_userdir configuration. Please post the correct section. Edited November 15, 2012 by Geoff
ZeroHour Posted November 15, 2012 Posted November 15, 2012 Yeh I think your missing mod_userdir possibly. Enable apache mod_userdir on Debian - jah's blog Blog mod_userdir - Apache HTTP Server 1
demsley Posted November 29, 2012 Author Posted November 29, 2012 (edited) 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.... UserDir public_html UserDir disabled root AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Order allow,deny Allow from all Order deny,allow Deny from all 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 Edited November 29, 2012 by demsley
Geoff Posted November 29, 2012 Posted November 29, 2012 The users public_html folder is missing or unreadable by the webserver. 1
demsley Posted December 7, 2012 Author Posted December 7, 2012 Thanks for this but I'm not sure why. The folder ,and all files within, have 755 permissions.
Geoff Posted December 7, 2012 Posted December 7, 2012 If you think it is SELinux you can temporally put it into permissive mode to check.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now