[Samba] Regarding close-denied-share option
Rowland Penny
rpenny at samba.org
Wed Jun 18 13:51:26 UTC 2025
On Wed, 18 Jun 2025 13:36:25 +0000
"., Srikanth N S" <srikanth.nagasubbaraoseetharaman at hpe.com> wrote:
> Thanks Rowland for the reply.
>
> If I understand correctly, if the share permission was RW and if I
> add an user in the read list then close-denied-share will work
> because I am denying write permission. If I remove the user from the
> read list then close-denied-share will not have any effect because
> the user is not denied of any permission (read or write).
That is how I read it, if you add a user to 'read list =' and then run
the smbcontrol cmd, that user is disconnected.
>
> Please let us know if my understanding is correct. If so then could
> you please let us know how to notify this change to SMB client in
> this case.
Not sure you can, without disconnecting all users from the share.
>
> We also tried the reverse scenario which is having RO permission for
> the share and then add an user to the write list. As mentioned
> earlier adding an user is notified to the windows client when we
> issue close-denied-share. But when we remove the user from the write
> list and then issue close-denied-share the client is not notified of
> the permission change. In this case the user is actually denied of
> write permission and hence we expect close-denied-share to notify the
> SMB client.
I do not know how you can get smbd to know if a user was just added to
'write list' or removed from 'read list', mainly because the
permissions etc are set at connection time, the user needs to be
disconnected and then reconnect to get the new permission.
Rowland
More information about the samba
mailing list