OS 10.14.2 / ubuntu 10.04/ samba 4.9.2
My ultimate aim is to use a samba share with Time Machine. I have built an up to date version of samba (4.9.2) which has the necessary support for Time Machine and installed it on my linux system, and I have it sharing a volume which I can mount from my Mac. A good start ;)
The problem is that I get permission errors whenever I try and create any files or directories:
henry-crunn:timemachine rful011$ id uid=501(rful011) gid=20(staff) ... henry-crunn:timemachine rful011$ ls -l /Volumes/ total 64 lrwxr-xr-x 1 root wheel 1 3 Feb 10:43 Macintosh HD -> / drwx------ 1 rful011 staff 16384 3 Feb 12:04 timemachine drwx------ 1 rful011 staff 16384 3 Feb 12:04 timemachine-2 henry-crunn:timemachine rful011$ touch /Volumes/timemachine/test touch: /Volumes/timemachine/test: Permission denied
The permissions as shown by ls -l look fine but I still get permission denied on any operation that creates files on the volume.
I get the same error when I tried to use tmutil to add the volume to the backup list -- this is when I first realised there was a problem.
Here is the smb config:
Mac OS support
vfs objects = catia fruit streams_xattr fruit:aapl = yes
[timemachine] comment = Time Machine path = /mnt/macmini-bb/timemachine browseable = yes writeable = yes create mask = 0600 directory mask = 0700 spotlight = no fruit:time machine = yes
Any thoughts on what I have screwed up or things to check?
update after more fiddling and research:
It seems to be a locking issue. I created a file on the linux side of the share and then opened it with textedit on the back. All good until I tried to modify the file and then I got a popup saying that the file was locked -- would you like to duplicate it.
After a bit more googling I found lots of post concerning locked files and shares, mostly suggesting that the issues are related to MacOS trying to create previews on shared drives
What is event stranger is that Get Info does not show the file is locked.
The suggestion is that finder tries to create previews of the contents of the drive and leaves locks in the directory.