[Samba] hide unreadable

Bjoern Baumbach bb at sernet.de
Tue Apr 8 10:04:00 MDT 2014


On 04/08/2014 05:09 PM, Thomas Manninger wrote:
> but, when i save with notepad a file to the share, saving is very fast.

In this case samba does not need to check all files.
>From the smb.conf manual page:
hide unreadable (S)
...
   Please note that enabling this can slow down listing large
   directories significantly. Samba has to evaluate the ACLs of all
   directory members, which can be a lot of effort.

> The user "Administrator" have also not the probem (is for the administrator the check for reading skipped)?

Yes, it is.
>From source3/smbd/dir.c:
        /*
         * Never hide files from the root user.
         * We use (uid_t)0 here not sec_initial_uid()
         * as make test uses a single user context.
         */

        if (get_current_uid(conn) == (uid_t)0) {
                return True;
        }

Björn

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba mailing list