This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[SOLVED] Symlinks to data in samba share

CIFS/SMB network sharing.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
rekabbelac
NewUser
NewUser
Posts: 2
Joined: 15 Aug 2012 18:08
Status: Offline

[SOLVED] Symlinks to data in samba share

Post by rekabbelac »

I recently upgraded from my old NAS (D-link DNS-323).

I have a couple of people that accessed the NAS that don't need access to my full main fileshare, but to a couple different folders in different places on the share.

Previously, I just created a folder for each user in the root of my Data folder structure (/mnt/DataShare) called ".shares", and inside that folder had folders for each user ".user1share",".user2share"... etc. inside those folders I would put symlinks to the content they needed access to. For example in the .user1share, I would create a symlink to my photos folder (ln -s /mnt/DataShare/myfiles/Pictures/Photos Photos). Then I would create a samba share for that user (to the .user1share folder), and map it as a shared drive on their Windows computer and/or set it as an ftp root directory for their credentials. I might also add symlinks for podcasts, music or other items, the basic idea is that I would like those users to only see a subset of my files, and that they only have one point to connect to.

When I try to do this setup on my Nas4Free box, I get an access denied error when trying to go to the linked directory (even though the user has permissions on the target directory, set permissions to 777 to test). The user can see and create content in their .user1share folder, but can't navigate through the symlinks. The permissions on the symlink itself show as 755 , and I can't change them with chmod. I have made sure that the user is a member of the group the folder belongs to.

I've also tried mapping the root share (/mnt/DataShare) with the user1 credentials, and can navigate through the symlink with out an issue, as well as to the folder directly.

Any ideas for options to accomplish this goal with NAS4Free?

Hopefully I've been clear enough with my question, please ask if there is something I can clarify.

Any help or suggestions are appreciated!

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Symlinks to data in samba share

Post by fsbruva »

Two things-

1. Symbolic links are not actual things, and thus have no REAL inode permissions, which is why you can't chmod them. Intelligent applications should dereference the link and process the absolute location's permissions.

2. Samba must be configured to allow following symlinks outside the currently shared tree.

rekabbelac
NewUser
NewUser
Posts: 2
Joined: 15 Aug 2012 18:08
Status: Offline

Re: Symlinks to data in samba share

Post by rekabbelac »

Thanks!

Must have been enabled by default on my old NAS. Modifying the Auxiliary parameters under Services|CIFS/SMB|Settings and adding:

Code: Select all

unix extensions = no
wide links = yes
did the trick! (obviously there are some security concerns with this, but nothing should be an issue in my case, since I am the only user with a shell set.

Schof
Starter
Starter
Posts: 17
Joined: 06 Aug 2012 21:58
Status: Offline

Re: [SOLVED] Symlinks to data in samba share

Post by Schof »

rekabbelac,

Let me start off by saying "thank you" for describing the problem that has been frustrating me for months now so succinctly. It enabled me to find this topic.

Secondly, THANK YOU for taking the time to post the actual solution. It would have taken me countless hours to figure out what "Samba must be configured to allow following symlinks outside the currently shared tree" meant let alone figure out where to configure it in NAS4Free.

I will pay it forward in kind!

Post Reply

Return to “CIFS/SMB (Samba)”