LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-01-2003, 11:20 AM   #1
sk8guitar
Member
 
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415

Rep: Reputation: 30
creating pub direcotries for users?


hi, i was wondering how i would go about making a pub directory for some users? like i would for in their home account to have a directory called "pub" where they could put all the stuff they wantedt o host. i tried doing symbolic links to /var/www/html but that didn't seem to cut it, and i'm thinking i need to mess with some apache config files? could somoen eplease guide me in the right direction. thanks.
 
Old 10-01-2003, 12:13 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 253Reputation: 253Reputation: 253
Good documentation about setting up public_html type folders here for 2.x version: http://httpd.apache.org/docs-2.1/en/...blic_html.html

Should be the same concept for other versions you might be using as well.
 
Old 10-01-2003, 01:23 PM   #3
sk8guitar
Member
 
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415

Original Poster
Rep: Reputation: 30
hey thanks tricky, worked great. have another quick question. i want peopel to be able to list files in a directory without an index.html page. right now it gives you a 403 forbidden when you try and view a directory without an index.html. i can't seem to find where it talks about that in the apache site. do you know where i could find this information?
 
Old 10-01-2003, 02:43 PM   #4
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
<Directory /home/.../>
Options Indexes
</Directory>

and "Options FollowSymlinks" might be a feature you're looking for
If you use AllowOverride, you can override httpd.conf parameters in a .htaccess file that is stored in the directory.

oh, and if you want a global pub directory where anyone can write data, but not remove each others files:

mkdir /data/pub
chmod go+w /data/pub (group+others may write)
chmod +t /data/pub (only remove your own files)

or only a single group:
chgrp users /data/pub
chmod g+w /data/pub
...

Last edited by yapp; 10-01-2003 at 02:44 PM.
 
Old 10-01-2003, 03:10 PM   #5
sk8guitar
Member
 
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415

Original Poster
Rep: Reputation: 30
i tried the followsymlinks suggestion and restarted httpd but its still giving me the 403. any other ideas?
 
Old 10-01-2003, 03:46 PM   #6
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
Check this out...
http://www.linuxquestions.org/questi...od+public_html
 
Old 10-01-2003, 04:58 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 253Reputation: 253Reputation: 253
Put something like this in your httpd.conf file and then restart apache:

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>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
Or you can just edit yours to look like this instead:
Code:
<Directory /home/*/public_html>
Options Indexes
</Directory>

Last edited by trickykid; 10-01-2003 at 05:01 PM.
 
Old 10-02-2003, 07:07 PM   #8
sk8guitar
Member
 
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415

Original Poster
Rep: Reputation: 30
tried it tricky, still doesn't work. i'd just liek to restate exactly what i want to be able to do. i want to be able tos how the files in a directory without having an index.html or any html page directly linking them. right now i can go to files and it all works fine but it won't show the contents of the directory.
 
Old 10-02-2003, 10:28 PM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 253Reputation: 253Reputation: 253
Are you actually storing the html or files in public_html directory in the users home directory? What is the exact folder your storing these files in and I assume after making the changes to httpd.conf you are restarting the httpd server?
 
Old 10-03-2003, 06:33 PM   #10
sk8guitar
Member
 
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415

Original Poster
Rep: Reputation: 30
yeah, i am restarting the httpd server. i am storing these files in the public_html directory as well.
 
Old 10-03-2003, 08:10 PM   #11
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
Worth a shot.....try doing it like +Indexes
 
Old 10-04-2003, 08:26 AM   #12
sk8guitar
Member
 
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415

Original Poster
Rep: Reputation: 30
nope. oh well.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating new users skvasistha Linux - General 3 11-26-2004 11:02 PM
Creating subdirectories within multiple exisitng direcotries jse580 Linux - Newbie 5 10-02-2003 12:18 PM
creating users ergo_sum Linux - Newbie 3 08-13-2003 04:46 PM
Creating Users mrsolo Linux - Software 2 12-10-2002 01:39 AM
Creating users... sancho5 Linux - General 2 08-23-2001 06:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:35 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration