SOLVED "Mountpoint {Path} not within path {Path}/blah/foo. This may indicate that the path of the SMB share contains a symlink component."

ryun

Dabbler
Joined
Mar 17, 2023
Messages
14
I ran into this problem repeatably on all of my pools on TrueNAS-SCALE-22.12.1 when trying to make an SMB share. I'm trying to share a file deeper in the tree to make it easier for people to get to the folder they want from the windows network neighborhood (I also want to manage ACL permissions with the GUI) and getting this error on creation:
[EINVAL] sharingsmb_create.path_local: Mountpoint /mnt/BackupTank/test not within path /mnt/BackupTank/test/blah/foo. This may indicate that the path of the SMB share contains a symlink component.

It's weird because this happens with any directory lower than "blah" in my folder path. So /mnt/BackupTank/test/blah/foo? Error. /mnt/BackupTank/test/blah/foo/bar? Error. /mnt/BackupTank/test/blah? Success! I'm just using the wizard to do this and not changing anything except the folder path. This is consistent across all pools. I even made a brand new pool/dataset while making folders on the shell to test it and it still happens. I am fairly new to linux but when using ls -l to check for symlink's all the folders are categorized as directories and not symbolic links.

Can anyone please explain why this is and if I'm doing something wrong?
 

aguest

Cadet
Joined
Apr 2, 2023
Messages
2
I'm seeing the same thing this morning with my SMB shares. Running find . -type l also returned no symlinks in any mounts for me. Hopefully someone has resolved this issue.
 

crownrai

Dabbler
Joined
Mar 12, 2023
Messages
11
I just ran some tests and have come across the same problem. It appears that you can't create an SMB share any lower than one directory below a Dataset directory. I'm not sure if this is a bug, or some intended implementation to workaround another issue.

ex.
Sharable:
/mnt/pool/datatset/dir1/
NOT sharable:
/mnt/pool/datatset/dir1/subdir1/

Sharable:
/mnt/pool/dataset/subdataset/subdir1
NOT sharable:
/mnt/pool/dataset/subdataset/subdir1/subsubdir1
 

aguest

Cadet
Joined
Apr 2, 2023
Messages
2
Out of curiosity, I took a look at the SMB code. It looks like there was a change on February 28th that changed the code responsible for checking that the Dataset path is within new SMB mountpoint. It looks like the is_child_realpath() is where this error is coming from.

What confuses me is that when I run the same Python code from the command line, that is_child_realpath() is running, the checks pass.
 

ryun

Dabbler
Joined
Mar 17, 2023
Messages
14
Thanks you two for confirming I'm not crazy. I'm going to go ahead and create a bug.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Curious. I just attempted to reproduce this on a test machine running SCALE 22.12.1 - but it seemed to be just fine with it.

1680793187020.png


1680793229553.png


Can you post any additional steps that might be needed to reproduce this, both here and in the bug report? Thanks!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Try 1 level deeper with a subdirectory.
 

ryun

Dabbler
Joined
Mar 17, 2023
Messages
14
Interesting @HoneyBadger that there's no issue on your end. Thanks for trying it out though! I added a ticket all the same with some more detailed repro steps and a video. https://ixsystems.atlassian.net/browse/NAS-121370 Maybe there's something I'm doing differently?

Try 1 level deeper with a subdirectory.
In the video I uploaded to the ticket I go as low as 4 levels deep below the root dataset. Still the same issue, unfortunately.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
There we go. Created folder /foo2 through the SMB://test share, that shared OK. Created /foo2/bar2 through the same share, now I get the error.

1680794441372.png


Interesting @HoneyBadger that there's no issue on your end. Thanks for trying it out though! I added a ticket all the same with some more detailed repro steps and a video. https://ixsystems.atlassian.net/browse/NAS-121370 Maybe there's something I'm doing differently?


In the video I uploaded to the ticket I go as low as 4 levels deep below the root dataset. Still the same issue, unfortunately.

I'll check in on that. Thanks for the detail!
 

ryun

Dabbler
Joined
Mar 17, 2023
Messages
14
My ticket got marked as a duplicate but the good news is that this has been fixed with the release of 22.12.2. Thanks again for the assistance!
 
Top