SMB Wide Symlinks disabled again in OSX 10.7 Lion

Hey Everyone. I'm hoping all you fellow Linux / Apple experts out there can help me to make an adjustment that I would assume is minor, but has a big impact in my home network. Sometime around the release of 10.6.5 Apple decided to turn off wide symlinks for SMB shares as it was a security threat. Well after digging around I found that you can manually change these settings by editing the /etc/smb.conf file. Worked great. I have a home network server off my Mac that everything from my Windows 7 PC machine to my android phone connects to to access the shares off my mac through SMB. Problem is all these shares are setup with symlinks.


When OSX 10.7 was released, I've read that Apple ditched the open source samba and has their own setup now for SMB and AFP. This is all fine and dandy, but once again wide symlinks is disabled (Folders / Files show as 0kb instead of an actual file / folder) and I can't access any of the folders/files off my SMB shares anymore as they are all setup as symlinks. This has been beyond annoying. I've checked the smb.conf file in both /etc and /var/db/ to make sure:


follow symlinks = yes

wide links = yes

unix extensions = no

wide symlinks = yes


to make sure wide symlinks work on my SMB shares as before with NO LUCK. My guess is with the new Apple made SMB setup they are storing the settings for wide symlinks in a different location. DOES ANYONE KNOW WHERE I CAN MAKE THIS SIMPLE ADJUSTMENT in OS X 10.7 Lion???


Thank you.

Mac Pro, Mac OS X (10.7)

Posted on Jul 31, 2011 11:01 PM

Reply
21 replies

Aug 3, 2011 4:04 PM in response to Poi§on

I was able to get symlinks working on a 10.7 system by editing the file located at /System/Library/LaunchDaemons/com.apple.smbd.plist - locate the "ProgramArguments" array (notice that it's calling /usr/sbin/smbd), and add two strings: "--no-symlinks" and "false" - it should look like this:


<key>ProgramArguments</key>

<array>

<string>/usr/sbin/smbd</string>

<string>--no-symlinks</string>

<string>false</string>

</array>


I found this command line option by performing the following terminal command:

/usr/sbin/smbd -help


After modifying this launchd plist, you will need to toggle filesharing off/on for this to take effect.


From what I found, it was not necessary to include any of the "wide links", "unix extensions", "wide symlinks", or "follow symlinks" options in any configuration files.

Aug 29, 2011 12:46 PM in response to piii666

It does not work as a charm as I thought on the beginning.

My problem is that I have a folder, that is shared. It has lots of symlinks to other areas of my macbook, most of them work perfectly (after adding a flag as suggested previously).


But, I have some symlinks pointing at mounted external drives (ln -s /Volumes/myUSB myUSB) ... and when I try to go there, Windows XP says: "myUSB is not available. Incorrect parameter". I went to to cmd line and issued 'dir', and it appears that myUSB is of "Junction" type - I dunno, whether it is the issue or not. Some 'Junction' type folders work ok, some, like those pointing at USB don't.


File/folder permissions are ok, the symlink stright to /Volums works, I can even traverse to Macintosh HD (/). The only problem is with those mounted USB drives. Any idea?

Aug 29, 2011 2:22 PM in response to piii666

What is the volume format on the external USB drive? Is it formatted as HFS Extended (Journaled)? You can check the volume formatting by performing a "Get Info" on the external USB drive - look at the "Format" option under "General".


Maybe it's necessary to reformat that drive as an HFS+ volume before it can be shared with symlinks?


Alternately, is the option to "Ignore ownership on this volume" checked when you "Get Info" on the drive? It might help to check that box at the bottom of the Get Info window.

Aug 29, 2011 5:11 PM in response to piii666

I have noticed in 10.7 that Apple's new Samba implementation breaks sharing from drives that are not formatted with HFS+. For example I have a number of usb drives formatted as NTFS, working fine on Lion using Paragon NTFS. I cannot share the contents of these drives via smb in Lion, connecting to them from a client will fail. It should be noted that this worked perfectly in all previous versions of OSX I've tested (Tiger, Leopard, Snow Leopard).


The only way to solve this issue was to install and manually configure the open source Samba3 from MacPorts. I have disabled Apple's Samba and am now running the open source version (Which was the one used in Snow Leopard and all previous OSX versions), which works fine with both NTFS formatted drives and symlinks. It also allows a lot more flexibility with options than Apple's version, though I warn you setting it up isnt for the faint of heart, it can require a fair amount manual configuration.

Sep 12, 2011 11:55 AM in response to Abou Jalloh

what does the following command say?

ls -la /System/Library/LaunchDaemons/com.apple.smbd.plist


Does it have any access rights? It should have +r +w for root,

if not, then try:


sudo chown root /System/Library/LaunchDaemons/com.apple.smbd.plist

sudo chmod +rw /System/Library/LaunchDaemons/com.apple.smbd.plist


the use nano via sudo:


sudo nano /System/Library/LaunchDaemons/com.apple.smbd.plist

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

SMB Wide Symlinks disabled again in OSX 10.7 Lion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.