+ Post New Thread
Results 1 to 15 of 15
*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 ...
  1. #1
    demsley's Avatar
    Join Date
    Feb 2007
    Location
    Sheffield, UK
    Posts
    29
    Thank Post
    19
    Thanked 2 Times in 2 Posts
    Rep Power
    16

    Unhappy 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.

  2. #2

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,786
    Thank Post
    272
    Thanked 1,130 Times in 1,026 Posts
    Rep Power
    348
    Whats in your config file for the site? Under /etc/apache2/sites-available/default (or any other name you have given this file)

  3. #3

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Indeed, post your relevant apache configuration sections.

  4. #4

    twin--turbo's Avatar
    Join Date
    Jun 2012
    Location
    Carlisle
    Posts
    2,334
    Thank Post
    1
    Thanked 381 Times in 340 Posts
    Rep Power
    150
    is the user folder chmod,chgrp,chown (ed) the same as the other user folders.

    Rob

  5. #5
    demsley's Avatar
    Join Date
    Feb 2007
    Location
    Sheffield, UK
    Posts
    29
    Thank Post
    19
    Thanked 2 Times in 2 Posts
    Rep Power
    16
    Quote Originally Posted by twin--turbo View Post
    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

  6. #6

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,686
    Thank Post
    334
    Thanked 513 Times in 481 Posts
    Rep Power
    178
    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

  7. Thanks to Steve21 from:

    demsley (21st November 2012)

  8. #7

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,631
    Thank Post
    890
    Thanked 1,314 Times in 798 Posts
    Blog Entries
    1
    Rep Power
    441
    I *think* apache defaults disable user dirs from working properly until you turn them on, having a good now for the note I spotted.

  9. #8
    demsley's Avatar
    Join Date
    Feb 2007
    Location
    Sheffield, UK
    Posts
    29
    Thank Post
    19
    Thanked 2 Times in 2 Posts
    Rep Power
    16
    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>

  10. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    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.

  11. #10

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,631
    Thank Post
    890
    Thanked 1,314 Times in 798 Posts
    Blog Entries
    1
    Rep Power
    441

  12. Thanks to ZeroHour from:

    demsley (21st November 2012)

  13. #11
    demsley's Avatar
    Join Date
    Feb 2007
    Location
    Sheffield, UK
    Posts
    29
    Thank Post
    19
    Thanked 2 Times in 2 Posts
    Rep Power
    16
    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.

  14. #12

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    The users public_html folder is missing or unreadable by the webserver.

  15. Thanks to Geoff from:

    demsley (7th December 2012)

  16. #13
    demsley's Avatar
    Join Date
    Feb 2007
    Location
    Sheffield, UK
    Posts
    29
    Thank Post
    19
    Thanked 2 Times in 2 Posts
    Rep Power
    16
    Thanks for this but I'm not sure why. The folder ,and all files within, have 755 permissions.

  17. #14


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    SELinux on ?

    tail your /var/log/messages

  18. #15

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    If you think it is SELinux you can temporally put it into permissive mode to check.

SHARE:
+ Post New Thread

Similar Threads

  1. Remote access of user areas from home
    By everton4europe in forum Wireless Networks
    Replies: 5
    Last Post: 18th July 2008, 12:29 PM
  2. Replies: 6
    Last Post: 29th February 2008, 12:03 AM
  3. Odd WSUS error
    By Gatt in forum Windows
    Replies: 28
    Last Post: 25th November 2006, 10:09 PM
  4. Replies: 30
    Last Post: 24th November 2006, 08:33 AM
  5. 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
  •