Jump to content

Recommended Posts

Posted (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 by demsley
Posted
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

Posted

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 1
Posted

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

 

Posted (edited)
That configuration section is not relevant to mod_userdir configuration. Please post the correct section. Edited by Geoff
  • 2 weeks later...
Posted (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 by demsley
  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...