Daniel Kamil Kozar
2017-Dec-29 06:29 UTC
[Samba] open() called from within Samba returns EROFS on a filesystem that was remounted R/W
Hello. I have a Samba share pointing to a mount point which is mounted read-only on boot. It has since been remounted as R/W. The share itself is marked as writable in smb.conf : [storage] path = /mnt/storage/ guest ok = yes browseable = yes writable = yes After connecting to the share via CIFS as an authenticated user, I get a "permission denied" message, with the error code being NT_STATUS_ACCESS_DENIED. I straced the forked Samba process that's running with the privileges of the user that I log in as, and saw that open() returns EROFS : getcwd("/mnt/storage", 4096) = 13 open("a", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0644) = -1 EROFS (Read-only file system) Meanwhile, running a simple "touch" on said mount point, as the same user as the one running the forked Samba process, works fine. Why does Samba not seem to respect the remount? I tried restarting the smbd daemon, but with no effect. Running Samba 4.7.3-Debian on Debian unstable, kernel 4.14.7. Thank you in advance, Daniel