Roger Lainson
2009-Nov-18 04:07 UTC
[Samba] Replacing a file turns off group and world read permissions
I'm running Samba 3.32 on UbuntuServer 9.04 with both Ubuntu and Windows clients as guests. For some common shares I have create mask = 777 and force create mode = 777. This works fine except that when I *replace* a file on this share by certain methods on an Ubuntu client, the permissions get set to 733 (-rwx-wx-wx), so the file is then unreadable (and undelete-able) by a guest. The problematical methods are dragging a repeat of the same file into Nautilus file browser, or performing a repeat save as from Evince DocViewer, (which means it's a particular nuisance with PDF files), but not saving from other apps as far as I can see. There's no problem with Windows clients. The samba log shows that in these cases the file is opened with read=No write=Yes, then opened again with read=Yes write=Yes, then closed and opened and closed several more times, and finally closed for the first open, which I guess leaves the read=No write=Yes. Can I override this behaviour in any way? Or should I just tell users never to replace a PDF!? Thanks, Roger L.
Roger Lainson
2009-Nov-19 01:48 UTC
[Samba] Replacing a file turns off group and world read permissions
My problem is that when I *replace* a file on a share, the file permissions get changed from 0777 to 0733. I'm running Samba 3.32 on Ubuntu Server 9.04 with both Ubuntu and Windows clients as guests. For some common shares I have create mask = 777 and force create mode = 777. This works fine for creating files, but when I replace a file on this share by certain methods on an Ubuntu client, the permissions get set to 0733, so the file is then unreadable (and undelete-able) by a guest. The problematical methods are simply dragging a repeat of the same file into Nautilus file browser, or performing a repeat save as from Evince DocViewer (which means it's a particular nuisance with PDF files). As far as I can see there's no problem with saving from other Ubuntu apps, or with Windows clients, or with Ubuntu clients on other shares which are not guest-accessible. The section of smb.conf for the share is: [SDRFiles] writeable = yes path = /var/sdr/SDRFiles write list = sdr force directory mode = 0777 force group = sdr force create mode = 0777 force user = sdr comment = SDR Files on server3 guest only = yes public = yes create mode = 0777 directory mode = 0777 Be glad of any suggestions. Thanks, Roger