OT:Apache question

Rick Stevens rstevens at vitalstream.com
Fri Feb 20 19:15:45 UTC 2004


Mark Knecht wrote:
> Rick Stevens wrote:
> 
>>
>> Why not get into your apache config file and do something like this:
>>
>>     Alias /files "/directory/where/the/files/are"
>>
>>
>>     <Directory "/directory/where/the/files/are">
>>         Options Indexes FollowSymlinks MultiViews
>>         AllowOverride None
>>         Order allow,deny
>>         Allow from all
>>     </Directory>
>>
>> Stop and restart Apache after changing the file.  Aiming your browser
>> at "http://www.your.site/files" will result in an index listing of the
>> "/directory/where/the/files/are" directory.
> 
> 
> Rick,
>    Starting to make the changes now. Thanks.
> 
>    One question. What permissions need to be on the 
> "directory/where/the/files/are" ?? I want them to be bother 
> readable/streamable and also copiable if someone right clicks and wants 
> to save them.

The directory must be readable and executable by the Apache process
(typically "nobody" but check the "User" and "Group" directives in
httpd.conf).  The files themselves must be readable by Apache.

If you want to set the permissions for that directory AND everything
below:

	chmod o+rx /directory/where/the/files/are
	cd /directory/where/the/files/are
	find . -type d -exec chmod o+rx \{\} \;
	find . -type f -exec chmod o+r \{\} \;

This would chmod all _directories_ below /directory/where/the/files/are
to "other: read execute" and all files to "other: read".

Hope that helps ("find" is a VERY useful tool, BTW).
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-     Is that a buffer overflow or are you just happy to see me?     -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list