1

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:

[global]

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. enter image description here

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.

  • Have you tried backing up to a sparseimage on that share? I did something similar on a Win2012 server and I had to use a sparseimage and reformat that sparseimage as HFS+ as it seems that even if you specify HFS+ when creating one in disk utility it creates it as APFS. – Steve Chambers Feb 3 at 0:26
  • You could have any number of entries in /Volumes, they do not necessarily correspond with current mounts. You can remove the ones that do not. In your example, at some point the share you connected to was assigned the name 'timemachine-2' by the OS, that's why that appears in /Volumes. – Marc Wilson Feb 3 at 3:10
  • Can you pls try to select the Time Machine share in the Time Machine preferences in Preferences.app? Does it bring up an error dialog? – Gummibando May 13 at 13:50

You must log in to answer this question.

Browse other questions tagged .