Web lists-archives.com

Re: [Samba] old bug with usershares of what?




On Mon, 5 Nov 2018 19:32:29 +0300
Илья Коскин via samba <samba@xxxxxxxxxxxxxxx> wrote:

> oh sorry, of course i have a typo in 6.
> The user usershare dir depends on system where samba was build.
> For example in fedora it is /var/lib/samba/usershares,
> and in openbsd it is /var/samba/usershares.
> I am sure i am doing everything right.
> 

Yes, I think you are too.

The error message you are getting comes from here:

if (sys_stat(usersharepath, &sbuf, false) != 0) {
    DEBUG(0,("load_usershare_service: stat of %s failed. %s\n",
	usersharepath, strerror(errno) ));
	return -1;
}

Which, to my limited understanding of 'C', means it checks if 'stat'
can be run successfully against the usersharepath and it doesn't look
like it can.

Not sure who 'stat' is being run as ? 
Is it root, if so it should work.
Is it an authenticated user who is a member of the group usershare,
if so, it should work.
It could however be a guest user, which would make the actual user
'nobody' who probably isn't a member of the group 'usershare' (I
hope) and this user will not be able to run 'stat' on the usershare
directory.
Finally, it could be an authenticated user, who isn't a member of the
'usershare' group, again, this user wouldn't be allowed to run 'stat'
on the share directory.

I could of course have missed the point all together and be totally
wrong.

Rowland
  

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba