I couldn’t figure out a way to use the Finder to copy/move the directories with their ACLs and Extended Attributes intact. A regular Finder Drag-and-Drop as well as a regular copy/paste creates the directory with the same name, ownership, and permissions but the ACLs and Extended Attributes are NOT included on the destination. Even Finder paste while holding Shift+Option+Command, Paste Item Exactly
results in this error:
Furthermore, I also wasn’t able to find a flag for cp
or mv
that would keep ACLs and Extended Attributes intact at the destination.
Exasperated, I went back to this video and studied the three methods that he says can be used to move a Home directory to an external drive.
- Drag-and-Drop while logged into another Administrator’s account doesn’t work because it changes ownership;
- Syncing the Home directory to the external drive might have worked but I didn’t try it because (a) I wasn’t comfortable with the flags, and (b) he mentioned glitches that he ran into; and
- Draging-and-Dropng a Time Machine back up of the Home directory to the external drive worked perfectly:
Internal Drive
nello@miniMe ~ % pwd
/Users/nello
nello@miniMe ~ % ls -l@e
total 0
drwx------@ 5 nello staff 160 Jan 16 15:18 Desktop
com.apple.macl 72
0: group:everyone deny delete
drwx------@ 3 nello staff 96 Jan 16 14:15 Documents
com.apple.macl 72
0: group:everyone deny delete
drwx------+ 3 nello staff 96 Jan 16 14:15 Downloads
0: group:everyone deny delete
drwx------+ 84 nello staff 2688 Jan 16 14:35 Library
0: group:everyone deny delete
drwx------ 3 nello staff 96 Jan 16 14:15 Movies
drwx------+ 3 nello staff 96 Jan 16 14:15 Music
0: group:everyone deny delete
drwx------+ 5 nello staff 160 Jan 16 14:38 Pictures
0: group:everyone deny delete
drwxr-xr-x+ 4 nello staff 128 Jan 16 14:15 Public
0: group:everyone deny delete
nello@miniMe ~ %
External Drive
nello@miniMe nello % pwd
/Volumes/Sidecar/Users/nello
nello@miniMe nello % ls -l@e
total 0
drwx------@ 3 nello staff 96 Jan 16 14:15 Documents
com.apple.macl 72
0: group:everyone deny delete
drwx------+ 3 nello staff 96 Jan 16 14:15 Downloads
0: group:everyone deny delete
drwx------ 3 nello staff 96 Jan 16 14:15 Movies
drwx------+ 3 nello staff 96 Jan 16 14:15 Music
0: group:everyone deny delete
drwx------+ 5 nello staff 160 Jan 16 14:38 Pictures
0: group:everyone deny delete
drwxr-xr-x+ 4 nello staff 128 Jan 16 14:15 Public
0: group:everyone deny delete
nello@miniMe nello %
The next step was to delete the following directories on the internal drive and replace each of them with a symlink that points to the corresponding directory on the external drive:
~/Documents
~/Downloads
~/Movies
~/Music
~/Pictures
~/Public
For each of these six directories, I:
- Removed the ACLs with
chmod -RN
, and
- Deleted the contents and the directory itself with
rm -iR
.
Unfortunately, macOS recreates these directories if they are missing so the only way that I could ultimately replace the directory with a symbolic link was with a stacked conditional command in the form:
rmdir directoryName && ln -s /Volumes/Sidecar/Users/nello/directoryName ~/directoryName
This worked for ~/Documents
and ~/Downloads
but resulted in the error, rmdir: directoryName: Operation not permitted
for ~/Movies
, ~/Music
, and ~/Pictures
, leaving me with:
nello@miniMe ~ % pwd
/Users/nello
nello@miniMe ~ % ls -l@e
total 0
drwx------@ 5 nello staff 160 Jan 16 15:18 Desktop
com.apple.macl 72
0: group:everyone deny delete
lrwxr-xr-x 1 nello staff 38 Jan 16 19:17 Documents -> /Volumes/Sidecar/Users/nello/Documents
lrwxr-xr-x 1 nello staff 38 Jan 16 19:21 Downloads -> /Volumes/Sidecar/Users/nello/Downloads
drwx------+ 84 nello staff 2688 Jan 16 14:35 Library
0: group:everyone deny delete
drwx------ 2 nello staff 64 Jan 16 19:23 Movies
drwx------ 2 nello staff 64 Jan 16 19:24 Music
drwx------ 2 nello staff 64 Jan 16 19:32 Pictures
lrwxr-xr-x 1 nello staff 35 Jan 16 19:26 Public -> /Volumes/Sidecar/Users/nello/Public
Interestingly, each of these directories corresponds to an application that controls placement of files.
- Movie
In the application TV > Settings > Files, change /Internal/Users/nello/Movies/TV/Media
to /Sidecar/Users/nello/Movies/TV/Media
- Music
In the application Music > Settings > Files, change /Internal/Users/nello/Music/Music/Media
to /Sidecar/Users/nello/Music/Music/Media
- Pictures
In the application Photos create new library in /Sidecar/Users/nello/Pictures
What else can I try to make ~/Movies
, ~/Music
, and ~/Pictures
into symbolic links?
Thank you for your help.