Find the answer to your Linux question:
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.
  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
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,526
    We store various files in an nfs share and access them by mounting it as a local directory.

    Could you do the same?
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

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

  4. #4
    Just Joined!
    Join Date
    Nov 2013
    Posts
    1
    Quote Originally Posted by asten77 View Post
    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...

    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.

  5. #5
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    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.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

Posting Permissions

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