Mount of SAMBA share via fstab ignores file permissions and somehow sets its own
This problem seems to be introduced by one of the latest SAMBA updates of bionic 18.04 and xenial 16.04. Our Debian stretch 9.5 clients operate as expected. The SAMBA server is running RHEL7.5 .
If we mount the SAMBA share via fstab entry, file permissions on the client are altered to allow anybody to read or execute files -- or access directories. It's possible to set file_mode and dir_mode in fstab to mitigate this behaviour, still we'd love to know why it happens.
//server.fqdn/samba /samba cifs noauto,
Hopefully it's not a bug.
Greetings
Martin
## Debian CLIENT#########
/etc/fstab
//server.fqdn/samba /samba cifs user,noauto,
$mount /samba
$ls -lah /samba
drwx------+ 2 user group 0 Dez 13 15:39 .
drwxr-xr-x 1 root root 282 Dez 13 14:53 ..
-rw-------+ 1 user group 0 Dez 13 15:39 touch.file
As ACL is set too:
$ getfacl /samba/touch.file
# file: samba/touch.file
# owner: user
# group: group
user::rw-
group::---
other::---
## Ubuntu CLIENT#########
/etc/fstab
//server.fqdn/samba /samba cifs user,noauto,
$ mount /samba
$ ls -lah /samba
drwxr-xr-x 2 user group 0 Dez 13 15:39 .
drwxr-xr-x 31 root root 4,0K Dez 13 15:46 ..
-rwxr-xr-x 1 user group 0 Dez 13 15:39 touch.file
$ umount /samba
$ ls -lah /samba
drwx------ 2 user group 4,0K Dez 13 15:46 .
drwxr-xr-x 31 root root 4,0K Dez 13 15:46 ..
## RHEL SERVER #########
#ls -lah of server.
drwx------. 2 user group 31 13. Dez 15:39 .
drwxr-xr-x. 9 root adm 4,0K 13. Mär 2018 ..
-rw-------. 1 user group 0 13. Dez 15:39 touch.file
server.
[global]
server string = Samba Server Version %v
netbios name = server
workgroup = CS
hosts allow = 127., 192.168.1.0/24
security = user
passdb backend = tdbsam
username map = /etc/samba/usermap
encrypt passwords = true
load printers = no
printcap name = /dev/null
disable spoolss = yes
[homes]
comment = Home Directories
browseable = no
writable = yes
create mask = 0700
directory mask = 0700
[samba]
create mask = 0700
directory mask = 0700
path =/srv/shares/
writeable= yes
# smbstatus
Samba version 4.7.1
PID Username Group Machine Protocol Version Encryption Signing
-------
1384 user group 192.168.1.51 (ipv4:192.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Martin Johannes Dauser
- Solved:
- Last query:
- Last reply: