Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Samba no longer follows symbolic links

  1. #21
    Join Date
    Jul 2006
    Beans
    217

    Re: Samba no longer follows symbolic links

    Quote Originally Posted by zdude View Post
    I ended up using these three options in the global sections:

    follow symlinks = yes
    wide links - yes
    unix extensions = no


    This was the only way that I could follow sym links in Lucid that previously worked in 8.04.
    Didn't work for me. Had to add:

    force user = USERNAME

    in each share section.

  2. #22
    Join Date
    Jan 2007
    Beans
    11

    Re: Samba no longer follows symbolic links

    Quote Originally Posted by theLured View Post
    Thanks I solved it by opening this file
    Code:
    sudo gedit /etc/samba/smb.conf
    Then I put this under the [global] section
    Note: It's "wide links" and not "wide symlinks"
    Code:
    follow symlinks = yes
    wide links = yes
    unix extensions = no
    Save it and then run this to restart samba.
    Code:
    sudo /etc/init.d/samba restart
    This worked for me.
    Thanks piratebill
    Success! Thank you all!

  3. #23
    Join Date
    Mar 2008
    Beans
    41

    Re: Samba no longer follows symbolic links

    Thanks to all the previous replies to this thread I've managed to get my samba share working also, but have had to change my /etc/samba/smb.conf even more than the others on this thread.

    I'm running Ubuntu 10.04 on a desktop and a Laptop, and the only way I can get them to do a samba share and follow symlinks is to add the following to both the [global] AND [My.Username] sections of /etc/samba/smb.conf.

    follow symlinks = yes
    wide links = yes
    unix extensions = no

    So to repeat, those three lines are in my Global section, and down the end of the file in my Username section. The only other line in my username section is the directory which has the symlinks pointing to the directories I'm willing to share.

    Very glad i found this thread.

    So that's Samba, ssh and ftp with login working, now to find out what webDav does.

    Cheers all.

  4. #24
    Join Date
    Nov 2008
    Location
    Sheffield, UK
    Beans
    1,514
    Distro
    Ubuntu

    Re: Samba no longer follows symbolic links

    Quote Originally Posted by theLured View Post
    Thanks I solved it by opening this file
    Code:
    sudo gedit /etc/samba/smb.conf
    Then I put this under the [global] section
    Note: It's "wide links" and not "wide symlinks"
    Code:
    follow symlinks = yes
    wide links = yes
    unix extensions = no
    Save it and then run this to restart samba.
    Code:
    sudo /etc/init.d/samba restart
    This worked for me.
    Thanks piratebill



    Thanks!!

  5. #25
    Join Date
    Aug 2007
    Beans
    26

    Re: Samba no longer follows symbolic links

    I know this is bumping a new thread, but wanted to post another fix.

    It seems that 11.10 that this issue still occurs and the fix to disable unix extensions and enable wide links does not work. The solution to this is a bit more complicated.

    The security issue that the article suggests is actually fairly serious. If you are working in an environment where you cannot trust your users, you should consider the solution below:

    Edit /etc/fstab. You will need to use sudo as it's a system file.

    At the bottom, type in the following line:
    Code:
    /path/to/directory   /home/user/directory_link   none   bind   0 0
    The first parameter is the directory you want to link to. The second directory is the directory you want to link to. This directory should be EMPTY be an actual directory (or folder as is the parlance of Windows users). It should also be placed within the samba share branch you plan on exporting. In this case, I'm sharing my home directory and placed directory_link within it.

    The third parameter indicates the type of partition your mounting. In this case, since your just mounting folder, it is set to none. The fourth option indicates the type of mount. Your binding to a directory. The last two are options are for actual partitions so they are set to 0.

    Once you add the line to the file, mount the partition:
    Code:
    sudo mount /home/user/directory_link
    Since you placed this in /etc/fstab, it will survive reboots.

  6. #26
    Join Date
    Apr 2007
    Location
    Behind you
    Beans
    167

    Re: Samba no longer follows symbolic links

    Quote Originally Posted by sohmc View Post
    I know this is bumping a new thread, but wanted to post another fix.

    It seems that 11.10 that this issue still occurs and the fix to disable unix extensions and enable wide links does not work. The solution to this is a bit more complicated.

    The security issue that the article suggests is actually fairly serious. If you are working in an environment where you cannot trust your users, you should consider the solution below:

    Edit /etc/fstab. You will need to use sudo as it's a system file.

    At the bottom, type in the following line:
    Code:
    /path/to/directory   /home/user/directory_link   none   bind   0 0
    The first parameter is the directory you want to link to. The second directory is the directory you want to link to. This directory should be EMPTY be an actual directory (or folder as is the parlance of Windows users). It should also be placed within the samba share branch you plan on exporting. In this case, I'm sharing my home directory and placed directory_link within it.

    The third parameter indicates the type of partition your mounting. In this case, since your just mounting folder, it is set to none. The fourth option indicates the type of mount. Your binding to a directory. The last two are options are for actual partitions so they are set to 0.

    Once you add the line to the file, mount the partition:
    Code:
    sudo mount /home/user/directory_link
    Since you placed this in /etc/fstab, it will survive reboots.

    that is very clever. Doing it in samba (as far as I understand) only creates a security hole if you have admins who do stupid things. If you (or an admin) creates a sym link to dangerous areas yes that is a problem. Otherwise I don't think there would be any security hole.

Page 3 of 3 FirstFirst 123

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
  •