

When I run this command from a ubunut mate terminal running as the ubuntu-mate user. When using the Ubuntu mate desktop file explorer to get to the samba share I am logged in as "Live Session User" maybe that user as root access?

#Filewatcher on samba share windows
This was from Ubuntu - mate (shows the inode changing when I save an edit to the file while using Pluma) nano ls -il test-2.txtĢ16272635 -rw-r-r- 1 root root 5 Feb 25 00:45 ls -il test-2.txtĢ16272633 -rw-rw-rw- 1 osmc osmc 14 Feb 25 00:45 This was from Windows (the inode does not change when I save an edit to the file while using Notepad) ls -il test-4.txtĢ16272638 -rw-r-r- 1 osmc osmc 6 Feb 25 01:06 ls -il test-4.txtĢ16272638 -rw-r-r- 1 osmc osmc 13 Feb 25 01:07 is 0022 when working from the OSMC command line as root and creating files from there (not from the Samba Share).
#Filewatcher on samba share windows 10
In contrast, when I try from Windows 10 to edit and save a file with root:root and rw-r-r- from the Samba share I CANNOT save it, instead I get a permission denied error popup message. However, when using the Live USB trying out Ubuntu-mate is the "Live Session User" running as root? And if so would that be the reason why I can edit a file with root only write access ? I don't have a force user statement in the share. If true, is that also the reason why I can save an edit to a file that only has write permissions on the owner (root) and I am not root? Or am I? In this case I think I am the osmc user while accessing a file from the file explorer. So then the new file gets the ownership and permissions as dictated by the create mask and directory mask directives in smb.conf.Ĭan someone confirm if that is correct or no? I think this is because Pluma actually creates a new file every time you save an edit to the file. But then if I use the Ubuntu-mate file explorer to browse to the file via the Samba share and use the text editor Pluma to edit the file.įrom Ubuntu-mate I notice the ownership of the file changes.

If I create a file directly in the filesystem of the USB drive while sudo su (root) then I get a file with root:root ownership and rw-r-r- permissions. This smb.conf file somehow manages to create a samba share for any USB drive connected. Hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/ I am testing a network share I plan on sharing between Ubuntu mate and a Windows 10 PC.

But then files moved between two directories on NTFS drives will also keep their previous security attributes instead of inheriting those of the target folder.I am using the Ubuntu mate live cd/usb running 20-04-focal-LTS. In the meantime, you can avoid this behaviour by adding The solution is quite easy - I'm setting the attributes again with SetFileAttributes after copying the file security attributes. Unfortunately this causes Samba to change the file attributes to hidden and system. In this specific case, TC calls SetFileSecurity to apply the security attributes to the file. The problem is that Samba drives identify themselves as NTFS too, but strange things happen when actual NTFS functions are called! The reason is a Samba bug: When the option XPMoveMethod=1 is set in wincmd.ini (which it is by default on Windows XP and newer), TC will get the security attributes of the target folder and apply them to the target file on NTFS drives. I could finally reproduce it now, thanks for the Samba switches!
