[Samba] Hide the files that doesn't have permission to access

Partha Sarathi parthasarathi.bl at gmail.com
Wed Oct 21 17:18:00 UTC 2015


Hi,

Try these params to hide files when users doesn't have read/write access to
them.

hide unreadable (S)

This parameter prevents clients from seeing the existance of files that
cannot be read. Defaults to off.

Default: *hide unreadable = no*
hide unwriteable files (S)

This parameter prevents clients from seeing the existance of files that
cannot be written to. Defaults to off. Note that unwriteable directories
are shown as usual.

Default: *hide unwriteable files = no*



On Wed, Oct 14, 2015 at 9:06 PM, Nguyen Xuan. Hai <
hai.nguyenxuan at toshiba-tsdv.com> wrote:

> Thank you guys for your reply.
>
> I tried but it still does not work
> On 10/14/2015 5:37 PM, Stéphane PURNELLE wrote:
>
>>
>> These parameters must be put on share section, not in global section
>>
>>  hide unreadable = yes
>>     hide unwriteable files = yes
>> example
>>
>> [smb_shr1]
>>         path = /mnt/LV002/share1
>>         read only = no
>>         create mode = 0777
>>         directory mode = 0777
>>         public = yes
>>         valid users = hai
>> hide unreadable = yes
>>         hide unwriteable files = yes
>>
>> [smb_shr2]
>>         path = /mnt/LV002/share2
>>         writable = yes
>>         create mode = 0777
>>         directory mode = 0777
>>         public = yes
>>         valid users = test
>>          hide unreadable = yes
>>         hide unwriteable files = yes
>>
>>
> I mean users see only shares they can access. So "browseable = no" does
> not solve my problem
>
>> 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.
>>
>
> I tried but it still does not work
>
>> 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 again
>
> --
> =====================================================================
> 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
>



-- 
Thanks & Regards
-Partha


More information about the samba mailing list