[Samba] Strange logs: check_usershare_stat: file /var/lib/samba/usershares/ owned by uid 0 is not a regular file

Rowland penny rpenny at samba.org
Wed Dec 2 17:43:11 UTC 2020

On 02/12/2020 17:22, Jeremy Allison wrote:
> On Wed, Dec 02, 2020 at 09:06:33AM +0000, Rowland penny via samba wrote:
>> On 01/12/2020 22:55, Jeremy Allison wrote:
>>> Hang on a minute - the above says "Permission denied"
>>> for "/var/lib/samba/usershares/profiles.v6"
>>> That means the directory scanner found something
>>> inside:
>>> /var/lib/samba/usershares
>>>> Dec  1 09:14:25 raspberrypi smbd[21036]: [2020/12/01 
>>>> 09:14:25.676259,  0] 
>>>> ../../source3/param/loadparm.c:3422(process_usershare_file)
>>>> Dec  1 09:14:25 raspberrypi smbd[21036]: process_usershare_file: 
>>>> stat of /var/lib/samba/usershares/profiles.v6 failed. No such file 
>>>> or directory
>>> Now it says "No such file or directory" for
>>> "/var/lib/samba/usershares/profiles.v6"
>>> Which is right ?
>> There is nothing inside /var/lib/samba/usershares , do you think I 
>> would put profiles inside a usershare ?
> I'm not thinking anything Rowland (thinking hurts for me :-).
You and me both, my excuse is that I am now officially an old wrinkly, 
what's yours 😂
> I'm merely reading the log you posted.
Do you want more ? I seemingly can create them at will, just have to log 
out of Win10 and then back in again.
> There's obviously something strange here. If I send you
> some extra-verbose debug patches for that area of the
> code can you run with it so I can check something.
I take it this will entail compiling Samba, so I would have to do this 
in a VM, but not a problem, it will just take a short while, it will not 
happen instantly. Send the patches and lets see what happens.
> I'm starting to have a suspision about the directory
> scanning code...

I am suspicious about a lot of the Samba code, mainly because I don't 
understand it 😂


More information about the samba mailing list