Results 1 to 5 of 5

Thread: Debian NFS question

  1. #1
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Debian NFS question

    Hey guys.

    I have created a NFS share, for example called /video/Nordic

    Inside /Nordic i would have a subfolder called _EN/

    So the path is /video/Nordic/_EN/

    Here comes the question.

    When you create a NFS share, and share it ,) can you make a symbolic link to /video/Nordic/_EN/something.folder

    And then on the mounted share is it possible to "see" what the link points at (in this case a folder) instead of the link itself?

    My issue is that i see the symlink instead of what it points to when i mount the share on my local machine......

    The link is made from /video/folder/metadata1.folder /video/Nordic/_EN/metadata1.folder (on the remote NFS server)

    And instead of "seeing" the /video/Nordic/_EN/metadata1.folder and it's content i "see" the /video/Nordic/_EN/metadata1.folder(broken reference)

    Also my /etc/exports entri looks as follows
    /video/Nordic 10.1.42.0/16(rw,sync,insecure)

    Hope it makes sense.

    Thanks on advance.
    Kind regards.
    Last edited by Drenriza; September 18th, 2012 at 09:08 AM.

  2. #2
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Debian NFS question

    Thread moved to Other OS/Distro Talk.

  3. #3
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    804
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Debian NFS question

    A feature of NFS is that the filesystem exported is treated like a local FS on clients. This means that symlinks are not 'translated' or 'followed', they point to someplace on the client side, which is often nowhere unless they were made to be relative and point inside the share itself. That prevents users from making symlinks that would be able to 'peek' elsewhere on the server.

    There is a solution however.
    1) Create an empty directory called /video/Nordic/_EN/metadata1.folder
    2) For testing, make a bind mount to your target folder
    Code:
    sudo mount -o bind /video/folder/metadata1.folder /video/Nordic/_EN/metadata1.folder
    You should be able to see the contents of the target mounted in _EN/metadata1.folder
    3) Make this permanent with an fstab entry
    /video/folder/metadata1.folder /video/Nordic/_EN/metadata1.folder none bind 0 0
    4) Share BOTH /video/Nordic/_EN and /video/Nordic/_EN/metadata1.folder in /etc/exports and add nohide in the exports options.
    5) Mount the parent /video/Nordic/_EN in your clients. The child metadata1.folder should be visible and contain the right files.

    Cheers!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  4. #4
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Debian NFS question

    Hey Lewis.

    Thanks for the suggestion i will definitely look into it

    Kind regards.

  5. #5
    Join Date
    Sep 2007
    Beans
    5

    Re: Debian NFS question

    I know this is an old thread but it solved my issues sharing out an external USB drive using NFS. Thanks LewisTM!

Tags for this Thread

Bookmarks

Posting Permissions

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