roliver3 on 5 May 2005 17:58:30 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] USB mount as Apache DocumentRoot


That was it!!  I changed the policy in SELinux for apache, restarted and I can now access  the USB drive files. Awesome!!!  I had completely forgotten about the SELinux and it's security policies.  I knew you guys would be able to help me.  Thanks so much.  

Actually, I found two ways to do it

1) disable SELinux for apache 
setsebool -P httpd_disable_trans=1

2) Change the policy to let SELinux have access to new DocumentRoot
chcon -R system_u:object_r:httpd_sys_content_t /my/new/docroot


> On 5/5/05, <> wrote:
> > Hi all,
> > I'm new to the list and haven't been to any meetings yet but plan to in the 
> near future.  I live out in the burbs, lower bucks.  I hope this is an 
> appropriate question to ask this list.
> > 
> > I have Apache 2.0.52 installed on a lap top running Fedora Core3.  I use this 
> laptop for web development and I keep all my content files e.g. html,php, perl 
> etc on a USB jump drive.  I'd like to use the USB drive as the DocumentRoot for 
> apache.  Here are the steps I took
> > 
> > 1) mounted the USB drive like this: mount /dev/sdb1 /var/www/html/content 
> (this works fine)
> > 2) changed the DocumentRoot directive in httpd.conf to /var/www/html/content
> > 3) restarted apache
> > 
> > When it restarts I always get the following warning:
> > Starting httpd: Warning: DocumentRoot [/var/www/html/content] does not exist
> > 
> > I know the mount point exist because I can cd to the content dir and see 
> files.  I've tried mounting to a different directory and creating sym links to 
> the document root.  I've added Alias directives to the httpd.conf file then 
> referencing the Alias in the DocumentRoot but all to no avail.  I know there has 
> to be a way to do this.  Any help would greatly be appreciated.
> > 
> > Thanks
> > Rodney
> Hi Rodney:
> It looks like the problem is with Fedora's SELinux restrictions on
> what can be DocumentRoot.
> Googling -selinux apache documentroot- may point you in the right
> direction. I'm not experienced with selinux, so I can't just give you
> the quick answer.
> -- 
> -Chad C Waters
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --
> Announcements -
> General Discussion  --
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --