Macos – Restoring orphaned folders after update to macOS High Sierra

dropboxfilesystemsmacosssd

In order to back up my computer with Dropbox, my Desktop, Documents, Development, etc… folders are stored directly in my Dropbox folder (because Dropbox doesn't like symbolic links) and I replaced the original folders in my home directory with hard links.

When I updated to High Sierra, some of the original folders and links were maintained (such as the one to my Downloads folder), but others weren't — Finder is treating the folders in Dropbox as broken aliases and bash treats them as files owned by root. The actual files are still on the system somewhere (my 1TB SSD thinks it only has 55GB free space) and I'd like to restore them if possible.

The files are still safe in the cloud, but if I restored them elsewhere to this drive, I wouldn't have enough disk space left, so at the very least I would like to recover the hundreds of GB of space that the folders used to occupy.

How can I access + restore the original folders on the drive?

Contents of /Users/jceipek/Dropbox/jc_home/ (the files owned by root used to be directories):

drwxr-xr-x@   17 jceipek  staff    544 Apr 18 01:03 .
drwx------@   90 jceipek  staff   2880 Aug  8 09:37 ..
-rw-r--r--@    1 jceipek  staff  26628 Sep 26 07:16 .DS_Store
drwxr-xr-x@  151 jceipek  staff   4832 Aug 16 19:58 Application Support
-r--r--r--@    1 root     wheel      0 Jun  3  2014 Artwork
-r--r--r--@    1 root     wheel      0 Jun  3  2014 Calibre Library
-r--r--r--@    1 root     wheel      0 Jun  3  2014 Desktop
-rw-r--r--     1 jceipek  staff    825 Apr 18 00:47 Desktop\ParaspaceIcon.mtl
-rw-r--r--     1 jceipek  staff    475 Apr 18 01:03 Desktop\ParaspaceIcon2.mtl
-r--r--r--@    1 root     wheel      0 Jun  3  2014 Development
drwx------@   47 jceipek  staff   1504 Mar 16  2017 Documents
drwx------@ 1263 jceipek  staff  40416 Sep 25 21:25 Downloads
-r--r--r--@    1 root     wheel      0 Jun  3  2014 EXPO
-r--r--r--@    1 root     wheel      0 Jun  3  2014 Movies
-r--r--r--@    1 root     wheel      0 Jun  3  2014 Music
-r--r--r--@    1 root     wheel      0 Jun  3  2014 Pictures
-r--r--r--@    1 root     wheel      0 Jun  3  2014 Reading

Some of the links in my home folder:

lrwxr-xr-x     1 jceipek  staff      38 Mar 16  2017 Desktop -> /Users/jceipek/Dropbox/jc_home/Desktop
lrwxr-xr-x     1 jceipek  staff      42 Mar 16  2017 Development -> /Users/jceipek/Dropbox/jc_home/Development
lrwxr-xr-x     1 jceipek  staff      40 Mar 16  2017 Documents -> /Users/jceipek/Dropbox/jc_home/Documents
lrwxr-xr-x     1 jceipek  staff      40 Mar 16  2017 Downloads -> /Users/jceipek/Dropbox/jc_home/Downloads

I've tried running Disk Utility from internet recovery mode, which seems to complete fine until it gets to "Verifying allocated space" and reports:

error: Underallocation Detected on Main device: (80989975+1) bitmap address
(84980494)
Space Verification failed.
The volume /dev/rdisk2s1 could not be verified completely.
File system check exit code is 0.
Restoring the original state found as mounted.
Operation successful.

Running sudo du -xhd 1 in the root directory:

4.0K    ./.MobileBackups
  0B    ./.HFS+ Private Directory Data
1.0K    ./home
 19G    ./usr
2.2G    ./.Spotlight-V100
1.0K    ./net
  0B    ./.PKInstallSandboxManager-SystemSoftware
2.6M    ./bin
  0B    ./Network
1.1M    ./sbin
 17G    ./Library
  0B    ./.Trashes
 11G    ./System
 15M    ./.fseventsd
du: ./private/var/db/ConfigurationProfiles/Store: Operation not permitted
du: ./private/var/folders/zc/j_737dh967l96ss406b94dtm0000gn/0/SafariFamily: Operation not permitted
du: ./private/var/folders/zc/j_737dh967l96ss406b94dtm0000gn/0/com.apple.LaunchServices.dv: Operation not permitted
du: ./private/var/folders/zc/j_737dh967l96ss406b94dtm0000gn/0/com.apple.nsurlsessiond: Operation not permitted
du: ./private/var/folders/zc/j_737dh967l96ss406b94dtm0000gn/0/com.apple.routined: Operation not permitted
du: ./private/var/folders/pz/fb3ncjzj3y37gksf08f1g0t80000gp/0/com.apple.LaunchServices.dv: Operation not permitted
du: ./private/var/folders/zz/zyxvpxvq6csfxvn_n00000y800007k/0/com.apple.nsurlsessiond: Operation not permitted
5.0G    ./private
682M    ./.DocumentRevisions-V100
  0B    ./.vol
292G    ./Users
 51G    ./Applications
175M    ./opt
8.0K    ./dev
  0B    ./lost+found
8.9M    ./Volumes
  0B    ./cores
397G    .

Best Answer

  • I had hard links and found my files scattered in the root (/) under a folder called

    "/.HFS+ Private Directory Data?"