Sample Header Ad - 728x90

why can I delete a root owned file through samba share that is an NFS mounted folder?

0 votes
0 answers
437 views
- RHEL 7.9 - a server having the physical mount of /data has SELINUX as enforcing with the selinx bool samba_share_nfs set to on; this /data folder is NFS exported - a few NFS client servers mount this /data folder with no_root_squash and as NFS vers=4.1 - one NFS client as root writes /data/log.txt and this file has permissions -rw-r--r--. 1 root root - each NFS client server also samba shares out it's NFS mounted /data folder, where the /data/ folder permissions are drwxrwx---. 1 ron users; see below for smb.conf - through samba from my win10 pc, logged in as ron I can go to \\server\data and delete log.txt even though it has root.root rw-r-r permissions. **Why?** - *my code that writes log.txt has to be run as root, and I am ok with anyone being able to read my log.txt (I actually want that) I just don't want log.txt to be able to be deleted or edited.* --- # /etc/samba/smb.conf [global] workgroup = SAMBA security = user passdb backend = tdbsam printing = bsd printcap name = /dev/null load printers = no disable spoolss = yes [data] comment = data inherit acls = Yes read only = No path = /data directory mask = 770 create mask = 660
Asked by ron (8647 rep)
Oct 20, 2022, 04:01 PM