nfs remote folder share via smb - access denied.

Status
Not open for further replies.

catroot

Cadet
Joined
Aug 9, 2017
Messages
4
Hi all!
Haven`t found a solution yet to share via smb a folder, mounted via nfs on FreeNAS 11.
All i`ve got is visible share and access denied msg. Even dropping a symlink to any file on nfs remote folders - the same issue.
Any solves/suggestions to do this?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hi all!
Haven`t found a solution yet to share via smb a folder, mounted via nfs on FreeNAS 11.
All i`ve got is visible share and access denied msg. Even dropping a symlink to any file on nfs remote folders - the same issue.
Any solves/suggestions to do this?

Your question is rather odd. What *exactly* is the problem that you are trying to solve?

I'm asking this because mounting an NFS export then sharing it via Samba is pretty janky.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Hi all!
Haven`t found a solution yet to share via smb a folder, mounted via nfs on FreeNAS 11.
All i`ve got is visible share and access denied msg. Even dropping a symlink to any file on nfs remote folders - the same issue.
Any solves/suggestions to do this?
What are you doing! Don't try to share a NFS export that's mounted.

Access denied means the user trying to log in doesn't have permissions for that share. And since you didn't provide any information I can't help anymore.

You should also post your full system specs, freenas version, any error messages/logs and in this case describe what you are trying to do because what you just explained is probably the wrong solution.

Sent from my Nexus 5X using Tapatalk
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Access denied means the user trying to log in doesn't have permissions for that share.

Funnily enough, that's not always the case. Samba tries to map internal Unix error codes to NT error codes. Generally this works, but when a particular error Unix error code isn't in the mapping list, then Samba will just out a generic "Access Denied" message. I have a feeling that is the case here. I don't believe that NFS is technically fully POSIX-compliant, and samba may be trying something - expecting full posix compliance - that is failing horrifically and is throwing out the aforementioned generic "Access Denied" message. If that's the case, then what Samba's really saying is "stop trying to do this!"

Serious debugging might be required. Hence, I asked what the actual problem is that he's trying to solve.
 
Last edited:

catroot

Cadet
Joined
Aug 9, 2017
Messages
4
Well, i have an old machine with linux that exports via nfs3 some smb shared folders.
I need to bring them up on the new file server on FreeNAS 11.
My FreeNAS share has windows ACL tuned and works well. If i drop a link to the nfs mounted location - i`ve got access denied message from samba while trying to open a top link,

How to obtain an access via FreeNAS 11 samba share to the nfs mounted locations?
Do i need to replicate windows ACLs trought nfs3 (is this possible?) or something another things to achieve an access to the nfs files? Or samba4 will reject any attempt to access files outside its shared zfs volume?

On samba3 without ACLs and zfs, having ext4 fs i can share any nfs mounted or other mounted folders and control access using unix groupmaps... but here i confused.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
How to obtain an access via FreeNAS 11 samba share to the nfs mounted locations?
Do i need to replicate windows ACLs trought nfs3 (is this possible?)
No

Or samba4 will reject any attempt to access files outside its shared zfs volume?
No.

Try disabling zfsacl and streams_xattr vfs objects on the samba share that's on top of the mounted NFS export.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
You still might be much better off installing Samba on the NFS box and sharing the files via Samba from that machine. Volker Lendecke from the Samba project has commented before in the samba mailing list
You need to get over that. Running Samba on NFS imports is a really bad idea. At least every month people report strange lockups, timeouts and other weird things on this list that can be attributed to NFS imports.
 

catroot

Cadet
Joined
Aug 9, 2017
Messages
4
No

No.

Try disabling zfsacl and streams_xattr vfs objects on the samba share that's on top of the mounted NFS export.
No success. Lost access to the share completely. Even after switch to the unix type share on the zfs dataset. Rolled back.
If i just copy target files to the share location - all went ok, via symlink - no access.
Where else to dig for problems?
 

catroot

Cadet
Joined
Aug 9, 2017
Messages
4
As a workaround i will try to move files to the new FreeNAS, share them via NFS and share NFS folder on the old one.
 
Status
Not open for further replies.
Top