Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-11-2009, 05:30 PM   #1
LQ Newbie
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
Apache access to mounted folder

Is it possible for Apache (running on Fedora 10) to serve files from a mounted samba folder?

My DocumentRoot of httpd.conf is set to the default /var/www/html, and then I create a mounted folder:

mkdir /var/www/html/mysite
mount -t cifs // -o username=Admin /var/www/html/mysite

If I then try to navigate to anywhere within localhost/mysite in a browser I get "you do not have permission to access...".

Is there any way to set permissions to allow this?

I have also tried setting DocumentRoot to the mounted folder itself, but this does not even allow me to start Apache ("DocumentRoot must be a directory" error).

I have selinux turned off.

Thanks for any help.
Old 04-11-2009, 06:18 PM   #2
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 363

Rep: Reputation: 33
You can either:
  1. Add a uid/gid option. Assuming UID and GID are user/group IDs of Apache user:
    mount -t cifs // -o username=Admin,uid=UID,gid=GID /var/www/html/mysite
  2. Use umask, so that everyone can access them:
    mount -t cifs // -o username=Admin,umask=000 /var/www/html/mysite

Last edited by saman007uk; 04-11-2009 at 06:19 PM.
Old 04-13-2009, 01:53 PM   #3
LQ Newbie
Registered: Apr 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks very much. I tried adding the unmask=000 and it worked great.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache root folder access j.gonsalves Linux - Newbie 1 03-22-2009 07:02 AM
Add folder access to Apache conf quilop Linux - Server 6 02-24-2007 08:49 AM
Apache can not run when I use for Documentroot folder in which mounted a partition rustam Linux - General 1 12-09-2005 06:48 AM
Forbidden error with Apache when accessing mounted folder. maneeshsethi Linux - Newbie 2 12-22-2004 01:48 AM

All times are GMT -5. The time now is 02:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration