LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-08-2003, 07:11 PM   #1
Gilion
Member
 
Registered: Sep 2003
Location: Netherlands
Distribution: Debian 3.0
Posts: 78

Rep: Reputation: 15
Question about apache UserDir


I've got a question about the UserDir directive of apache 1.3.26.

After install the welcome page mentions the folowing

User directories are enabled, and user documents will be looked for in the public_html directory of the users' homes. These dirs should be under /home, and users will not be able to symlink to files they don't own.

Reading the UserDir directive info at apache.org:
UserDir public_html -> ~bob/public_html/one/two.html

So this means that I can acces files in /home/user/public_html/ over the web by requesting http://xxx.xxx.xxx.xxx/~user, right? In my case that doesn't work. This is what I get:

http://xxx.xxx.xxx.xxx/~user -> this page cannot be displayed
http://xxx.xxx.xxx.xxx/~user/ -> acces forbidden
http://xxx.xxx.xxx.xxx/~user/index.html -> acces forbidden

Just in case, standard httpd.conf contains this, which seems ok to me.

LoadModule userdir_module /usr/lib/apache/1.3/mod_userdir.so

<IfModule mod_userdir.c>
UserDir public_html
</IfModule>

Did I make wrong assumptions or is something wrong?

Gilion
 
Old 10-08-2003, 08:25 PM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
chmod 711/home/user and /home/user/public_html
 
Old 10-09-2003, 02:49 AM   #3
sashhoney
Member
 
Registered: Jul 2003
Distribution: Red Hat, Fedora, Debian
Posts: 85

Rep: Reputation: 15
i think u have to give 755 to public_html, as 'apache' should have executable rights on the public_html directory.
711 is okay for user directory.

also u should have proper


<Directory /home/*/public_html>
settings
in my case it looks like
<Directory /home/*/public_html>
AllowOverride none
Options All MultiViews
<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>
 
Old 10-09-2003, 07:08 AM   #4
Gilion
Member
 
Registered: Sep 2003
Location: Netherlands
Distribution: Debian 3.0
Posts: 78

Original Poster
Rep: Reputation: 15
Auch, it was a simple chmod-ing isue.



Thanks for the tip. As I'm moving forward to securing the server, I am still interested in the directory settings. I've added mine below. Can you briefly address the differences and explain which one is safer?

Gilion

<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>
 
Old 10-10-2003, 01:28 AM   #5
sashhoney
Member
 
Registered: Jul 2003
Distribution: Red Hat, Fedora, Debian
Posts: 85

Rep: Reputation: 15
well it depends on ur n/w requirement
1)AllowOverride should be none if u dont want to override certain default settings, specified in httpd.conf
2)I have selected All options, because in my case all the options are imp, MultiViews has to be selected separately anyway
3) Limit part is similar in both the cases, in my case i denied all other commands except few imp commands
 
  


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
Apache UserDir ]SK[ Linux - Software 4 06-18-2005 01:10 PM
Apache userdir. collen Linux - Networking 1 01-28-2005 01:24 PM
Apache UserDir Abbaddon Slackware 12 09-15-2004 12:28 PM
apache userdir subdomains kodon Linux - Networking 7 08-09-2004 08:16 PM
UserDir question apache Cigar Linux - Networking 10 02-10-2004 02:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:17 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
Open Source Consulting | Domain Registration