LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices



Reply
 
Search this Thread
Old 09-14-2005, 08:09 PM   #1
Smartcat99S
Member
 
Registered: Jan 2004
Location: NE
Distribution: Arch Linux, SUSE, Gentoo
Posts: 56

Rep: Reputation: 15
[FIXED] openSUSE 10 RC1 - Apache2 userdir forbidden


Using stock RC1 with latest ftp4.gwdg.de apt repo updates, I get a 403 forbidden when accessing http://localhost/~xraytux

Looking at /var/log/apache2/error_log:
"[Wed Sep 14 18:58:09 2005] [error] [client 192.168.0.198] client denied by server configuration: /home/xraytux/public_html"

The files are there and are set with rwxr--r-- and are owned by xraytux

In an .htaccess file XBitHack Full is enabled

The firewall port is open.

Any help is appreaciated.

Thanks.

Last edited by Smartcat99S; 09-19-2005 at 06:26 PM.
 
Old 09-15-2005, 07:24 AM   #2
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,281

Rep: Reputation: 61
Files need to be able to execute them as well rwxr-xr-x

try at the commandline:

chmod -R 755 /xraytux/public_html
 
Old 09-15-2005, 07:58 AM   #3
Gibsonist
Member
 
Registered: Mar 2004
Location: Meersburg (GER)
Distribution: Cygwin,RH 7.2 7.3, SuSe 6.4 8.2 9.1,TinyLinux, Debian Sarge, Knoppix 3.*, Knoppicilin, Knoppix STD
Posts: 191

Rep: Reputation: 30
Have you enabled User directories in the httpd.conf?

There should be a block looking something like this.
Code:
<Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS PROPFIND>
            Order allow,deny
            Allow from all
        </Limit>
        <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
            Order deny,allow
            Deny from all
        </Limit>
    </Directory>
uncomment it, and restart apache should work then

I should mention the above snippet is from Apache 1.3.X
not running apache2 at the moment but the controls are similar.
 
Old 09-15-2005, 10:41 AM   #4
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Rep: Reputation: 31
oops, sorry

Last edited by AxXium; 09-15-2005 at 10:53 AM.
 
Old 09-15-2005, 05:48 PM   #5
Smartcat99S
Member
 
Registered: Jan 2004
Location: NE
Distribution: Arch Linux, SUSE, Gentoo
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
chmod -R 755 /xraytux/public_html
Did that, no difference.

There is a file named /etc/apache2/mod_userdir.conf that has the userdir settings. I copied that to /etc/apache2/conf.d/mod_userdir.cond and got a internal server error.

Here are the contents:
Code:
xraytux@carthage:/etc/apache2> cat mod_userdir.conf
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#

<IfModule mod_userdir.c>
        # Note that the name of the user directory ("public_html") cannot easily
 be
        # changed here, since it is a compile time setting. The apache package
        # would have to be rebuilt. You could work around by deleting
        # /usr/sbin/suexec, but then all scripts from the directories would be
        # executed with the UID of the webserver.
        #
        # To rebuild apache with another setting you need to change the
        # %userdir define in the spec file.

        # not every user's directory should be visible:
        UserDir disabled root

        # to enable UserDir only for a certain set of users, use this instead:
        #UserDir disabled
        #UserDir enabled user1 user2


        # the UserDir directive is actually used inside the virtual hosts, to
        # have more control
        #UserDir public_html

        <Directory /home/*/public_html>

                AllowOverride FileInfo AuthConfig Limit Indexes
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

                <Limit GET POST OPTIONS PROPFIND>
                        Order allow,deny
                        Allow from all
                </Limit>

                <LimitExcept GET POST OPTIONS PROPFIND>
                        Order deny,allow
                        Deny from all
                </LimitExcept>

        </Directory>

</IfModule>
If you wish, I can tar up /etc/apache2 and put it somewhere so that you can look at it...
 
Old 09-19-2005, 05:47 PM   #6
Smartcat99S
Member
 
Registered: Jan 2004
Location: NE
Distribution: Arch Linux, SUSE, Gentoo
Posts: 56

Original Poster
Rep: Reputation: 15
BUMP!

I've posted a tarball of /etc/apache2

http://penguinlounge.1and2.org/videos/apache2.tar.bz2
 
Old 09-19-2005, 06:00 PM   #7
Gibsonist
Member
 
Registered: Mar 2004
Location: Meersburg (GER)
Distribution: Cygwin,RH 7.2 7.3, SuSe 6.4 8.2 9.1,TinyLinux, Debian Sarge, Knoppix 3.*, Knoppicilin, Knoppix STD
Posts: 191

Rep: Reputation: 30
In the httpd.conf uncomment the line
Code:
Include /etc/apache2/mod_userdir.conf
and restart apache
this should actually do it.
 
Old 09-19-2005, 06:24 PM   #8
Smartcat99S
Member
 
Registered: Jan 2004
Location: NE
Distribution: Arch Linux, SUSE, Gentoo
Posts: 56

Original Poster
Rep: Reputation: 15
AHA...

That was one of my tries to get it in... I was thinking that YAST should have configured that...

It now gives me Internal Server Error, but the error message is now more clear. (Need to change AllowOverride)

That's fixed too, and it works


Thanks to all for the cluebats!
 
Old 10-30-2005, 11:26 AM   #9
hattons
LQ Newbie
 
Registered: Oct 2005
Posts: 1

Rep: Reputation: 0
Technically you should have configured that using yast. It really isn't an ideal setup. The problem with configuring files by hand is that it messes up YaST's hashing which determines whether a file is under user control, or YaST control. If you change a config file, YaST assumes you know what you are doing, and with leave it unmodified when SuSEconfig is run. That means subsequent modifications through YaST will not be applied to that particular file.

The thing to do is go into YaST2->System->/etc/sysconfig Edit->Network/WWW/Apache2->APACHE_CONF_INCLUDE_FILES and add /etc/apache2/mod_userdir.conf to the space-separated list of filenames.
 
Old 02-11-2006, 11:12 PM   #10
jeffshultz
LQ Newbie
 
Registered: Feb 2006
Posts: 1

Rep: Reputation: 0
To those who helped out on this one... thanks. I'm running 10.0 final and it still is dorked up on this one.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some questions about OpenSUSE 10.0 RC1 koyi Suse/Novell 5 09-24-2005 07:42 AM
OpenSuSE 10.0 RC1 ChrisJCline Suse/Novell 2 09-23-2005 09:29 AM
Dual Monitor in OpenSUSE 10 RC1 gherikill Suse/Novell 3 09-12-2005 11:23 AM
apache2 UserDir: where do I start? Brother Michael Debian 2 01-07-2005 11:22 PM
UserDir not working in apache2 hamish Linux - Networking 4 06-29-2004 12:43 PM


All times are GMT -5. The time now is 05:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration