LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   creating pub direcotries for users? (https://www.linuxquestions.org/questions/linux-general-1/creating-pub-direcotries-for-users-99036/)

sk8guitar 10-01-2003 11:20 AM

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.

trickykid 10-01-2003 12:13 PM

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.

sk8guitar 10-01-2003 01:23 PM

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?

yapp 10-01-2003 02:43 PM

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

sk8guitar 10-01-2003 03:10 PM

i tried the followsymlinks suggestion and restarted httpd but its still giving me the 403. any other ideas?

Blinker_Fluid 10-01-2003 03:46 PM

Check this out...
http://www.linuxquestions.org/questi...od+public_html

trickykid 10-01-2003 04:58 PM

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>


sk8guitar 10-02-2003 07:07 PM

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.

trickykid 10-02-2003 10:28 PM

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?

sk8guitar 10-03-2003 06:33 PM

yeah, i am restarting the httpd server. i am storing these files in the public_html directory as well.

Looking_Lost 10-03-2003 08:10 PM

Worth a shot.....try doing it like +Indexes

sk8guitar 10-04-2003 08:26 AM

nope. oh well.


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