Web lists-archives.com

Re: [Samba] OS X client symlinks




I mean a Unix-style symlink as if created by "ln -s file link".

If I create Unix symlink, Finder will open the file UNLESS I move the linked file - in this case Finder CANNOT find the original file - the symlink is broken .

In my case the Finder is able to open symlinks, this is not the problem. The problem is that they are real normal files from the point of view of a client FS, not symlinks.

This is important because those files are NodeJS modules and they contain some relative requires: require('../blah-blah.js'). If the module is a symlink, those relative paths are computed from the symlink target by NodeJS, not the symlink itself. So symlinks are followed, as it's called. That happens on my server (CentOS). But when I run the same Node script on Mac OSX client, it doesn't work because that .js file is not a symlink and it's not followed and consequently the paths are broken because of that.


My samba server version is 4.8.3. "vfs_fruit", "vfs_catia" and "vfs_streams_xattr_init" are all present in Build options, as well as vfs_aio_fork_init, vfs_aio_pthread_init. In the Headers section, I see HAVE_AIO_H.

--
Best regards,
Serhii



On 4/13/19 9:27 PM, Todd Thorson via samba wrote:
When you say “real symlinks on OSX” do you mean an “alias” that Finder would create? Or a Unix-type symlink using the “ ln -s file link” command in Terminal?  A Finder alias is not the same as a Unix-type symlink.

My NAS runs Debian Linux with version 4.3.11 of smbd; my clients are all OSX Mojave.
If I create an alias using Finder on the NAS, it behaves like a normal alias in OSX UNLESS I move the original file on the NAS - in this case, Finder can find the original file, but will not open it unless I select “Show Original”.
If I create Unix symlink, Finder will open the file UNLESS I move the linked file - in this case Finder CANNOT find the original file - the symlink is broken .

What version of samba do you have?  smbd -V on my NAS
Do you have vfs_fruit, vfs_catia & vfs_streams_xattr compiled in?  smbd -b on my NAS
Check also for the HAVE_AIO_XXX  in the Defines and vfs_aio_xxx in the Build Options.
What is your smb.conf?




--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba