LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-11-2009, 04:30 PM   #1
pancakes
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 //192.168.0.100/M -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, 05:18 PM   #2
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 363

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

Last edited by saman007uk; 04-11-2009 at 05:19 PM.
 
Old 04-13-2009, 12:53 PM   #3
pancakes
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.
 
  


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 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 06:02 AM
Add folder access to Apache conf quilop Linux - Server 6 02-24-2007 07:49 AM
Apache can not run when I use for Documentroot folder in which mounted a partition rustam Linux - General 1 12-09-2005 05:48 AM
Forbidden error with Apache when accessing mounted folder. maneeshsethi Linux - Newbie 2 12-22-2004 12:48 AM


All times are GMT -5. The time now is 09:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration