Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: samba. Cannot follow sym links

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

    samba. Cannot follow sym links

    Hey guys.

    I have a samba share as follows
    Code:
    #======================= Share Definitions =======================
    
    [video1]
       comment = 2.5_Video1_share
       path = /srv/samba/content/path
       follow symlinks = yes
       wide links = yes
       unix extensions = no
    
    # By default, the home directories are exported read-only. Change the
    # next parameter to 'no' if you want to be able to write to them.
       ;read only = yes
    
    # File creation mask is set to 0700 for security reasons. If you want to
    # create files with group=rw permissions, set next parameter to 0775.
       ;create mask = 0700
    
    # Directory creation mask is set to 0700 for security reasons. If you want to
    # create dirs. with group=rw permissions, set next parameter to 0775.
       ;directory mask = 0700
       
    valid users = nice
    I can mount and ls the content of the mounted folder just fine on a remote (debian server) system.

    But i cannot follow symlinks outside the share.

    File permissions on the /srv/ folder recursively is 644 and 777 for symlinks.

    Anyone who has a suggestion?

    Kind regards.
    Last edited by Drenriza; October 18th, 2012 at 10:34 AM.

  2. #2
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,517
    Distro
    Ubuntu

    Re: samba. Cannot follow sym links

    Are the permissions for the parent directory's where the symlinks point to set?

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

    Re: samba. Cannot follow sym links

    Quote Originally Posted by SlugSlug View Post
    Are the permissions for the parent directory's where the symlinks point to set?
    To test this off this is how the structure is

    share is at

    /srv/samba/content/path

    symbolic link 1

    from /srv/test/Xfolder/folderX to /srv/samba/content/path/folderX

    symbolic link 2

    from /srv/test/Yfolder/Y.mpeg to /srv/samba/content/path/folderX/Y.mpeg

    and
    File permissions on the /srv/ folder recursively is 644 and 777 for symlinks.
    Last edited by Drenriza; October 18th, 2012 at 11:23 AM.

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

    Re: samba. Cannot follow sym links

    Can the issue be that my share is commented out with the 3 following lines

    # By default, the home directories are exported read-only. Change the
    # next parameter to 'no' if you want to be able to write to them.
    ;read only = yes

    # File creation mask is set to 0700 for security reasons. If you want to
    # create files with group=rw permissions, set next parameter to 0775.
    ;create mask = 0700

    # Directory creation mask is set to 0700 for security reasons. If you want to
    # create dirs. with group=rw permissions, set next parameter to 0775.
    ;directory mask = 0700

    From my understanding permissions on the share and symbolic links will follow?

    So if they have 744 rights those rights will follow to where the share is mounted?

  5. #5
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,517
    Distro
    Ubuntu

    Re: samba. Cannot follow sym links

    I think the path to where your pointing to also needs the permissions.

    To test try a sym link to /tmp and chmod it 777

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

    Re: samba. Cannot follow sym links

    Quote Originally Posted by SlugSlug View Post
    I think the path to where your pointing to also needs the permissions.

    To test try a sym link to /tmp and chmod it 777
    created a text.txt file containing test in /tmp and chmod'ded it with 777 permissions, and linked it to my share with

    Code:
    ln -s /tmp/test.txt /srv/samba/content/path/
    But when i on my remote machine, where i have mounted the share make a

    Code:
    ls -l /video1/
    ls: cannot read symbolic link /video1/test.txt: Permission denied
    ls: cannot read symbolic link /video1/21JumpStreet_EN: Permission denied
    Last edited by Drenriza; October 18th, 2012 at 11:23 AM.

  7. #7
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,517
    Distro
    Ubuntu

    Re: samba. Cannot follow sym links

    Quote Originally Posted by Drenriza View Post
    created a text.txt file containing test in /tmp and chmod'ded it with 777 permissions, and linked it to my share with

    Code:
    ln -s /tmp/test.txt /srv/samba/content/share/
    But when i on my remote machine, where i have mounted the share make a

    Code:
    ls -l /video1/
    ls: cannot read symbolic link /video1/test.txt: Permission denied
    ls: cannot read symbolic link /video1/21JumpStreet_EN: Permission denied

    ok and if you put a text file in /srv/samba/content/share/ can you read it?

  8. #8
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,517
    Distro
    Ubuntu

    Re: samba. Cannot follow sym links

    dunno if its a typo but
    /srv/samba/content/share/

    is diffrent to whats in your smb.conf

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

    Re: samba. Cannot follow sym links

    Quote Originally Posted by SlugSlug View Post
    dunno if its a typo but
    /srv/samba/content/share/

    is diffrent to whats in your smb.conf
    Corrected it in my posts.
    Last edited by Drenriza; October 18th, 2012 at 11:25 AM.

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

    Re: samba. Cannot follow sym links

    Quote Originally Posted by SlugSlug View Post
    ok and if you put a text file in /srv/samba/content/share/ can you read it?
    Yes.

    If i move it from /tmp to my share, then i can cat the file on the remote host in the mounted share.

    It's only as a sym link i have the issue.

Page 1 of 2 12 LastLast

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
  •