Nguyen Xuan. Hai
2015-Oct-14 09:55 UTC
[Samba] Hide the files that doesn't have permission to access
Hi all,
I want to shows a user only the files that he/she has permission to access.
I configured smb.conf like that:
[global]
workgroup = STORAGE
encrypt passwords = yes
security = user
access based share enum = yes
hide unreadable = yes
hide unwriteable files = yes
[smb_shr1]
path = /mnt/LV002/share1
read only = no
create mode = 0777
directory mode = 0777
public = yes
valid users = hai
[smb_shr2]
path = /mnt/LV002/share2
writable = yes
create mode = 0777
directory mode = 0777
public = yes
valid users = test
It is no effect. From windows 8 client, I accessed to samba server and
logged in by user "hai" but I still see two share folders (smb_shr1,
smb_shr2).
Thanks!
--
====================================================================Nguyen Xuan
Hai (Mr)
Toshiba Software Development (Vietnam) Co.,Ltd
--
This mail was scanned by BitDefender
For more information please visit http://www.bitdefender.com
mathias dufresne
2015-Oct-14 13:21 UTC
[Samba] Hide the files that doesn't have permission to access
Hi, Do you want users see only shares they can access or do you want users see only files they are allowed to open in some share? If the point is to hide shares you could try "browseable = no" in your shares declaration, as it is done on [homes] share in addition to "valid users = user" option. 2015-10-14 11:55 GMT+02:00 Nguyen Xuan. Hai <hai.nguyenxuan at toshiba-tsdv.com>:> Hi all, > > I want to shows a user only the files that he/she has permission to access. > I configured smb.conf like that: > > [global] > workgroup = STORAGE > encrypt passwords = yes > security = user > access based share enum = yes > hide unreadable = yes > hide unwriteable files = yes > > [smb_shr1] > path = /mnt/LV002/share1 > read only = no > create mode = 0777 > directory mode = 0777 > public = yes > valid users = hai > [smb_shr2] > path = /mnt/LV002/share2 > writable = yes > create mode = 0777 > directory mode = 0777 > public = yes > valid users = test > > It is no effect. From windows 8 client, I accessed to samba server and > logged in by user "hai" but I still see two share folders (smb_shr1, > smb_shr2). > > Thanks! > > -- > ====================================================================> Nguyen Xuan Hai (Mr) > > Toshiba Software Development (Vietnam) Co.,Ltd > > > -- > This mail was scanned by BitDefender > For more information please visit http://www.bitdefender.com > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
Harry Jede
2015-Oct-14 15:28 UTC
[Samba] Hide the files that doesn't have permission to access
On 17:24:22 wrote Nguyen Xuan. Hai:> Hi all, > > I want to shows a user only the files that he/she has permission to > access. I configured smb.conf like that: > > [global] > workgroup = STORAGE > encrypt passwords = yes > security = user > access based share enum = yes > hide unreadable = yes > hide unwriteable files = yes > > [smb_shr1] > path = /mnt/LV002/share1 > read only = no > create mode = 0777 > directory mode = 0777 > public = yes > valid users = hai > [smb_shr2] > path = /mnt/LV002/share2 > writable = yes > create mode = 0777 > directory mode = 0777 > public = yes > valid users = test > > It is no effect. From windows 8 client, I accessed to samba server > and logged in by user "hai" but I still see two share folders > (smb_shr1, smb_shr2).Sure, that is what you force with your settings in smb.conf. Remove: public = yes change the modes to 0XX0 the last bit is for the world or everyone or public> > Thanks!-- Gruss Harry Jede
It sounds like you want to hide shares and not files? With windows you
can hide a share from being browsed by doing the following.
[smb_shr1$]
path = /mnt/LV002/share1
read only = no
create mode = 0777
directory mode = 0777
valid users = hai
Appending the $ removes the share from being browsed. They can access
this share if they know the name however. You may still want 'browseable
= no' for other OS's that don't support the $. This all assumes
you're
attempting to hide shares and not files.
On 10/14/2015 5:55 AM, Nguyen Xuan. Hai wrote:> Hi all,
>
> I want to shows a user only the files that he/she has permission to
> access.
> I configured smb.conf like that:
>
> [global]
> workgroup = STORAGE
> encrypt passwords = yes
> security = user
> access based share enum = yes
> hide unreadable = yes
> hide unwriteable files = yes
>
> [smb_shr1]
> path = /mnt/LV002/share1
> read only = no
> create mode = 0777
> directory mode = 0777
> public = yes
> valid users = hai
> [smb_shr2]
> path = /mnt/LV002/share2
> writable = yes
> create mode = 0777
> directory mode = 0777
> public = yes
> valid users = test
>
> It is no effect. From windows 8 client, I accessed to samba server and
> logged in by user "hai" but I still see two share folders
(smb_shr1,
> smb_shr2).
>
> Thanks!
>
--
-James