SOLVED Connecting as user1 allows viewing of user2 share

Status
Not open for further replies.

SSS

Cadet
Joined
Oct 24, 2018
Messages
3
he Hello,

I'm struggling a little to create two secure shares on my FreeNAS 11.2 machine that behave correctly. Looking for some help or guidance.
Essentially I want some public shares for general access by all users (no passwords required), and two secured shares that require a login each to access but cannot access each other.

Pool layout is like so:
Code:
Pool
-GeneralDataSet
--General1
--General2
-SecureDataSet
--Secure1
--Secure2


I've created shares for the two General datasets and have "nobody" user and group setup on both pools. These shares work correctly, not requiring any login to access the shares. Working as desired.

For the secured shares, I've created two users in FreeNAS, each with their own seperate primary group. Let's call them SecUser1 and SecUser2.
I've made SecUser1 the user and group owner of the Secure1 dataset, and done the same with SecUser2 on the Secure2 dataset.

Creating a share for Secure1 and Secure2 worked. Freshly connecting to either Secure share I get prompted for login details. Good!

My problem comes AFTER I've logged in...

If I login as SecUser1, I get full read/write access to Secure1 share. HOWEVER, I noticed that I can now access Secure2 share and can read files in there too! (but not write or delete)
The reverse is also happens, SecUser2 can read SecUser1 share/data. This is not desireable at all.

Also, if I try to map Secure1 and Secure2 at the same time, windows throws an error saying "the network folder is currently mapped using a different username and password". But I've only mapped one of the shares, and it's for a different dataset and user/group.

How do I fix the issue of SecUser1 being able to read SecUser2 share data? (and vice-versa)
How do I fix Windows not being able to map both Secure shares simultaneously?

Any suggestions or tips would be appreciated.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Two things:
  • To change permissions (other than to set the default ones) you need to use a Windows client. Same as you would with Windows Server or a local file.
  • Windows cannot connect to a server with two sets of credentials at once. Not that there is any need to, because the correct solution is to give the shares the correct permissions so that users correspond to real people.
 
  • Like
Reactions: SSS

SSS

Cadet
Joined
Oct 24, 2018
Messages
3
Two things:
  • To change permissions (other than to set the default ones) you need to use a Windows client. Same as you would with Windows Server or a local file.
  • Windows cannot connect to a server with two sets of credentials at once. Not that there is any need to, because the correct solution is to give the shares the correct permissions so that users correspond to real people.
Thanks.
I've played around with permissions via a Windows client and simply removed the "Everyone" user for the two secure share folders. Seems to have solved the cross access issue.

As for Windows can't work with two sets of credentials per server; the old file server I'm wanting to replace has some old Fedora build on it, 12 perhaps, and it has two passworded samba shares on it, that I can both map at the same time on my Windows machine without issues. This is why I thought it'd be possible to replicate on FreeNAS.
Maybe Linux/BSD or samba in older versions presents the shares differently?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
With different credentials? You can mount an (almost) arbitrary number of shares on a single server, but only with one user at a time.
 

SSS

Cadet
Joined
Oct 24, 2018
Messages
3
I just checked, it's Fedora 11.
And I can map both passworded shares simultaneously using different user names for each share.
Interestingly, it only works when mapping. If I connect to the server and double-click either passworded share it simply denies access. Doesn't even prompt for a password.

So, it's possible...
Not sure what I did in samba to make it act that way though haha.

Ok. Well I'll just do the user/permissions thing as you mentioned for this FreeNAS machine then.

Thanks for the help.
 
Status
Not open for further replies.
Top