Results 1 to 5 of 5
Hi all... longtime lurker/googler, but 1st time poster I've been pulling my hair out for a couple days and cursing at google on this one, and I'm no closer to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-17-2010 #1
- Join Date
- Jan 2010
CIFS symlink / apache
I've been pulling my hair out for a couple days and cursing at google on this one, and I'm no closer to solving it.
I previously had a very old system with old samba mounts to a windows box. For illustration purposes, /mnt/windows
I had an apache install in /usr/www/. I had a /usr/www/htdocs/winshare directory that had an .htaccess for password protection, and the sole thing in here was a softlink (call it "c") to /mnt/windows
This worked wonderfully for many years. However, building a new box, I tried replicating this and it wasn't working. I would get nothing at all listed in a web browser pointed at servername/winshare. I get a 403 at servername/share/c. error_log shows "Symbolic Link is not allowed or link target not accessible."
So.. two key things in debugging:
first, i logged in as "daemon", which is the user that apache is running as - I could cd into the symlink directory, browse, and read files. This tells me there's no reason that apache could not access this symlink.
I then tried another symlink in the winshare directory to, say, /tmp (yes, bad idea, but just for a test). That shows up in the index, and is web browseable at servername/winshare/tmp
I've got the requisite FollowSymLink option enabled - obviously, or i wouldn't be able to browse to winshare/tmp. The issue seems to be that apache doesn't want to follow a symlink into a cifs share, despite the user having permissions to do so.
I cannot figure this out. Any help is greatly appreciated.
(for the record, this is a slack 13 box, with apache 2.2.14, mount.cifs 1.12-3.2.15)
Thanks in advance!
- 01-17-2010 #2
We store various files in an nfs share and access them by mounting it as a local directory.
Could you do the same?"I used to be with it, then they changed what it was.
Now what was it isn't it, and what is it is weird and scary to me.
It'll happen to you too."
The Fifth Continent
- 02-14-2010 #3
- Join Date
- Jan 2010
I have figured one thing out, if I mount the windows share directly under the directory where I was symlinking, changing nothing else, it works fine. That's not the optimal solution, but it'll do as a workaround.
Thus, it's definitely specific to symlinking to a cifs share. I don't know if this is a bug or feature in cifs or in apache. Apache is telling me it's not allowed, though, so I'm thinking it's the problem, as the user apache is running as *can* access it.
I'd still like to understand what's going on here...
- 11-10-2013 #4
- Join Date
- Nov 2013
I'm having the same problem, but I can add one more detail. A CIFS mount from a mac (HFS+) DOES work. Symlinks do work with Apache from a CIFS mount, but doesn't work with NTFS (or maybe the problem is with windows, but since it has worked for you before, it's probably not windows.)
I had a HFS harddrive mounted with CIFS and symlinked some files into /var/www/some_dir. When I switched back to my windows machine, I reformatted my external drive to NTFS. After that, the same linux box with all the same software/configuration, It ceased working.
- 11-11-2013 #5
Hi, JohnGalt131. Welcome aboard!
Since tghis thread is nearing 4 years old, I'm locking it down.
I would suggest starting a fresh discussion. Make sure to include all possible information and someone will be along to get you going in the right direction.