How to disable “ignore ownership” option on an external volume on Mac OS X El Capitan

backuphard driversyncterminal

I'm using a MacBook Pro 13'' mid-2012 running Mac OS X El Capitan (10.11.6).

My problem is similar to https://serverfault.com/a/402216/616473.

I use rsync to create backups from my internal drive to an external USB drive.

In order to save disk space, I would like the backups to be incremental. For that, I use rsync with the --link-dest option. It should result with rsync not transferring the unchanged previously backed up files. Instead, rsync should create hard links to those files.

rsync -arv --link-dest=/Volumes/EXTERNAL-HDD/backup-1/ /folder-to-backup/ /Volumes/EXTERNAL-HDD/backup-2/

For example, the files that have been backed up during Backup 1, and that have not changed since then, should not be transferred during Backup 2. Instead, in the folder backup-2/ should be hard links to those previously transferred files.

But rsync doesn't work properly in my case and it is not hard-linking the files (and is copying it twice). The reason for this problem is that rsync is not getting the real UID of the files : https://terminalapp.net/backups-rsync-and-link-dest-not-working/ because of the "ignore ownership" option that is enabled by default on Mac OS X.

So I would like to disable this "ignore ownership" option for the external drive. After some googling, I understand that there are two different ways : via the Finder (there should be a checkbox in the "Get Info" section of the drive) or via the Terminal (Change "ignore ownership on this volume" from the command line for Mac OS X volume).

I can't find the checkbox.

I tried to that :

sudo diskutil enableOwnership disk2s1

with disk2s1 being my external drive.

But I got the following error : Error enountered enabling user/group ownership: The underlying task reported failure on exit (-69860)

So, how the hell can I just turn off this ignore ownership for my specific external drive ?

Thank you for your answers

Best Answer

From comments, your disk is formatted as FAT32, which is incapable of holding unix or even Windows permissions.

enter image description here

It is also very dubious in its hardlink capability. You can force them, but file repair tools are likely to break them.

By far the best format for Mac backups is GUID/HFS+ not MBR/FAT32.
You will need to Erase (not Partition) the entire disk to change it to GUID/HFS+ (macOS Extended, Journaled; GUID Partition Map in Disk Utility) so you will either need to abandon your first effort or back it up somewhere - but note it will not have correct perms already, so I'd suggest starting over.