]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: Bind mount /var/lib/samba with 0755 64454/head
authorAnoop C S <anoopcs@cryptolab.net>
Fri, 11 Jul 2025 12:30:51 +0000 (18:00 +0530)
committerAnoop C S <anoopcs@cryptolab.net>
Fri, 11 Jul 2025 13:42:33 +0000 (19:12 +0530)
commit50db194bc478a2f017541fae6a84efea2f4eb39a
tree4828b7d8504dafd96b02ff87725b6c53b1d8d8f2
parenta52d6a9b9b215a950cf409ac42e5b9705c02d4b6
cephadm: Bind mount /var/lib/samba with 0755

To start with, all this while, `testparm -s` used to spit out the
following lines:

. . .
WARNING: state directory /var/lib/samba should have permissions 0755
         for browsing to work
WARNING: cache directory /var/lib/samba should have permissions 0755
         for browsing to work
. . .

Putting aside security sensitive stuff like secrets.tdb inside state
directory, others by design are expected to be accessed by configured
samba users and thus permissions differ between the directory and its
contents. With 0770 we denied the access for others and in certain
scenarios this denial resulted in real world problems like failure to
close file handles and other not so obvious return statuses.

Going by the design and corresponding warning emitted by the `testparm`
tool, it is safe and correct to change the mode from 0770 to 0755 while
preparing lib-samba bind mount for /var/lib/samba.

Fixes: https://tracker.ceph.com/issues/72089
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
src/cephadm/cephadmlib/daemons/smb.py