Friday, August 3, 2018

Corrupted Profile - In A Mac

Any IT professional that deals with users needs to know a bit of other Operating Systems. The three main ones currently are Windows, macOS and Linux.

I recently had a case where a customer using a Mac could not open any application. When the application icon was clicked, there were errors pointing to the Library folder and cache. All applications had the same issue. I thought about it for some minutes and logged out and back in, but under a different profile. The other profile did not display those issues, thus the issue being with the original profile

I created a new profile with Administrator priviledges (that was the access level for the original profile) and copied all documents over, thinking that all permissions would transfer, but, how wrong was I! The permissions for the iPhoto and Photo libraries did not transfer. They were under OriginalUser:OriginalGroup and the new user was NewUser:staff and when the customer tried to open iPhoto or Photos, there was an error about permissions

I had to use a bit of "command line" (or console/terminal) "magic" and change the permissions for the whole folder/application. I logged out and back in with another Administrator account, since the new user account did not allow me for the change. The other account did not have any password, which did not allow for sudo access. I changed the password and ran the commands, each in a different terminal session. Click on the upper right corner on "Spotlight" and type terminal. Open the application. Right click on the application icon on the lower bar and "New window" for the second terminal session

First terminal session:
sudo chown -R NewUser:staff /Users/NewUser/Pictures/iPhoto Library.photolibrary

Second terminal session:
sudo chown -R NewUser:staff /Users/NewUser/Pictures/Photos Library.photoslibrary/

Let both commands run until they finish. In this case, the customer had well over 250 GB of pictures in each application. The process took all night long. Once the terminal session showed the MacDeviceName:~ AdminUser$ prompt in each terminal session, the customer closed everything (Command + Q in each window) and logged out and back in. The customer reported all the pictures were accessible and viewable. No more permissions errors

I hope this helps someone

Regards,

F. Bobbio C.

No comments:

Post a Comment