Find the answer to your Linux question:
Results 1 to 3 of 3
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 ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2

    CIFS symlink / apache

    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 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!
    --asten

  2. #2
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,301
    We store various files in an nfs share and access them by mounting it as a local directory.

    Could you do the same?
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2
    Quote Originally Posted by elija View Post
    We store various files in an nfs share and access them by mounting it as a local directory.

    Could you do the same?
    Hi, thanks for the response. NFS is probably not an option here.

    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...