Results 1 to 5 of 5
Thread: CIFS symlink / apache
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 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!
We store various files in an nfs share and access them by mounting it as a local directory.
Could you do the same?Should you be sitting wondering,
Which Batman is the best,
There's only one true answer my friend,
It's Adam Bloody West!
The Fifth Continent
- 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...
- 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.
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.