I have been using an old HDD with a SATA-USB cable for a few months now on a Mac Mini (running macOS Mojave 10.14.6; HDD has one EFI partition and one other partition with Journaled HFS, unencrypted). I was using it regularly everyday. But now weird issues have started popping up - sometimes it doesn't mount, sometimes it doesn't open in Finder (blank window), sometimes it hangs in Finder for a long time etc.
What I have tried so far:
Changed the USB-SATA cable as I read that's a common issue. It didn't help.
Used
Disk Utility
to try and repair the disk and volume. It didn't work as it couldn't unmount the Volume. Manually unmounting also didn't work as macOS showed the spinning wheel for a long time. Was able to runDisk Utility
successfully from Recovery and view the files in Terminal. But Finder still didn't show the files or hung when the disk was accessed.Tried to access the files on the disk from the Terminal. But both
cd /Volumes/Backup
andls -la /Volumes/Backup
command give a Permission Denied error.Again went to Recovery, scanned and repaired the disk with
Disk Utility
and tried to determine the owner of the files through the recovery Terminal. The commandls -la /Volumes/Backup
listed the owner user and group of all the directory and files as_Unknown
(some of the dot files had root and wheel as the user and group respectively). So I tried to regain ownership of the files and directory I had created withchown -R 501:staff /Volumes/Backup/AllTheDirectories
. This was successful.But in macOS, Finder still had issues and the
Get Info
window however still listed root, wheel, System, Everyone as users / groups under 'Sharing and Permission'. So I removed root, wheel and System and added my username here with 'read & write' privilege. Finder still had issues, and commands in Terminal trying to view the directories on the disk gave a Permission Denied error.I went to Recovery again, ran
Disk Utility
again, and this time removed all the old ACL in all files and directories on the disk withchmod -RN /Volumes/Backup/
. After this, trying to view the files on the disk in Terminal again givesls: Backup: Permission denied
. With sudo, the command executes without error. But, it doesn't show any files or directory except .Trashes. (However, Terminal in Recovery shows all the files and directories are still there).
The issue crops up even if macOS is booted into Safe Mode. I can use Recovery to backup all the files (I tested by using tar to save some of the files to another disk and it worked fine). But I am very curious to know what exactly is the issue that macOS cannot display the files in Finder or Terminal.
(In between, I had also tried the enableOwnership option with diskutil
but it didn't help.)
What is the problem here and how can I fix this?
Update:
I tried removing the ACL and chown'ing the files again through Recovery, and now noticed a new behaviour - while previously Finder used to freeze when opening the disk (or only displayed the main directory and files and freeze if you tried to open any Folder or file), it now displays all the Folders on the disk correctly. I can also open the Folders and view the contents. But opening any files in a Folder gives the following error:
The file “2021-03-25 - For EC.png” could not be opened. It may be damaged or use a file format that Preview doesn’t recognise.
The file however isn't damaged - if I copy it to another disk from Recovery, I can open it fine. At the same time, while I can browse the files on Finder now, Terminal still gives a "Permission Denied" error for ls
command on the disk, and using it with sudo doesn't show any directory or files except .Trashes (as I have previously mentioned too).
chmod
instead). – Gordon Davisson Dec 03 '22 at 00:44