[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to create home directories

Posted on 2001-09-12
5
Medium Priority
?
210 Views
Last Modified: 2010-03-04
Hello,
I have installed apache 1.3.20 on my RedHat 7.1 Linux Machine.
I want to know does apache automatically assigns each user of the computer his home directory or I have to create home directory for each user on the system.

For example if a new user abc is added to the system his home directory /home/abc is created by the system. I want that he should be able to access files in /home/abc directory using url like http://localhost/~abc.
How I can do this?

SSruprai
0
Comment
Question by:Sukhwinder Singh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
Zook earned 150 total points
ID: 6478877
All you have to do is editing these example lines in your httpd.conf

#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<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>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>


If you dont want to have a subdirectory "public_html" you could try the lines
UserDir
or
UserDir .

(Haven't tried it, but it should work.)

Keep in mind that the files and all the directories below have to be readable for the user under which apache runs. That normally means they have to be world readable. Apache does not use the permissions of the refering user.

If it doesn't work, make sure you habe mod_userdir installed.

cu
Zook
0
 

Author Comment

by:Sukhwinder Singh
ID: 6480948
It means I have to make entry in httpd.conf for every user manually. And where should I create public_html.

For example if I have a user abc and its home directory is /home/abc where public_html should be created and what entry has to be made in httpd.conf and with what url this directory will be accessed. e.g. http://localhost/~abc

If I am wrong please explain with an example assuming a user name abc.
0
 

Author Comment

by:Sukhwinder Singh
ID: 6481356
Hello,
     Thank you very much for your help every thing is working. I didn't get it first time. I know that I don't have to add any user name to httpd.conf but please explain what /home/*/public_html means?

SSRuprai
0
 
LVL 1

Expert Comment

by:Zook
ID: 6503376
Sorry for the delay - I was on vacation.


The * in /home/*/public_html is just resolved to the user name, implying that the user's homedir has the name of the user. You can of course also use another path like /usr/local/home/*/public_www or just /home/*

The "public_www" can be created by adding it to /etc/skel (see "man useradd").

cu
Zook

0
 

Author Comment

by:Sukhwinder Singh
ID: 6504186
thank u very much for your help

SS
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question