[Samba] Regarding Samba Shares
Rowland Penny
rpenny at samba.org
Wed Jan 22 12:19:28 UTC 2025
On Wed, 22 Jan 2025 11:50:07 +0000
"., Srikanth N S via samba" <samba at lists.samba.org> wrote:
> Thanks for the replies. We were referring to changing the Samba share
> configuration. For eg in the below-mentioned share configuration
>
> [share1]
> path = /mnt/share1
> read only = no
> writable = no
> map readonly = yes
Interesting share, are you aware that basically 'read only' and
'wrtable' are the same thing. writable by default is set to 'yes' and
read only is set to 'no' or in other words, the share by default is
un-writeable by anyone. As it set above 'read only = no' allows writing
to the share, but this is immediately turned off by 'writable = no'
Now there is the parameter 'store dos attributes' in global (which you
haven't shown us) and by default this is set to 'yes' and, unless you
have set it 'no', this means that 'map readonly' will be ignored.
What the above means is, you might as well remove the last two lines
from the share.
>
> If we change writable to “yes” then it does not get reflected
> immediately.
>
> Similarly for eg in case of dynamic share if we change the permission
> using “net usershare add share2 /mnt/share2 "test share" test_user:F”
> then it does not get reflected immediately.
User shares are not reflected on the smb.conf, so reloading the config
will probably have no effect on those.
>
> As mentioned earlier we had to disconnect and connect the network
> drive corresponding to Samba share for the change in permission to
> get reflected.
>
> It seems like this is an expected behavior.
To a certain extent and most definitely on a DC where smbcontrol has no
effect.
Rowland
More information about the samba
mailing list