Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

solinari6

macrumors regular
Original poster
Aug 13, 2008
101
16
So I've run into a problem with some old backup code that I had. My mac died, and I lost my hard drive, but I did have a time machine external drive with things backed up.

When I got a new mac, I didn't want to backup from the time machine drive, because there was a ton of stuff on there I didn't want anymore, so I figured I'd just install a fresh version of mac OS X and then just copy over what I wanted from the time machine drive.

Apparently, that was a mistake? LOL

So that time machine hard drive is gone now, after I copied over the files I needed, I figured I didn't need that drive anymore.

But now, when I try to use those files, I'm getting all sorts of file permission exceptions. The files have the same owner name (me), but apparently the old me is different from the new me, since it will always ask for Sudo permission when I try to save one of those files.

I've tried using finder, to give EVERYONE access to all files in those folders. That doesn't work.
I've tried using finder, to give ADMIN access to all those folders. That doesn't work.

I've ran: sudo chown -R $(whoami) <folder name> That doesn't work either.

Every time I try to save a file, it asks for sudo passsword. Which obviously blows up all the build scripts since they can't edit any files.

copyFileSync: could not write to dest file (code=EACCES)
EACCES: permission denied, open

I've attached a pic of what the permissions look like on the files in that folder, and all parent folders

Not sure what to do at this point. I'm fine doing whatever sledgehammer approach is necessary. I don't give a rats ass about file permissions at this point, I just want this to work again!!! LOL
 

Attachments

  • Screen Shot 2021-04-26 at 10.10.11 AM.png
    Screen Shot 2021-04-26 at 10.10.11 AM.png
    12.9 KB · Views: 83
Do you keep all the "permissions challenged" files in one location?
In other words, can they be easily moved to an external drive?

If so, my suggestion:
1. You'll need an external drive large enough to hold all the files in question. It could be a hard drive, or even a USB flashdrive of sufficient capacity.

2. Copy the problem files to the external drive.

3. ERASE the problem files from your internal drive. GET RID of them.

4. Now, have the external drive mounted in the finder so you can see its icon.

5. Click on the external drive icon ONE TIME to select it.

6. Open the get info box for it (command-i).

7. At the bottom of get info, click the lock and enter your administrative password.

8. Put a checkmark into "ignore ownership on this volume" (sharing and permissions).

9. Close get info.

Now, you ought to be able to "copy back" the files in question to your internal drive while logged into your regular account. The copied files should now "fall under the ownership" of your [new] account, overriding all previous permissions issues.

I cannot guarantee this will work.
Perhaps you could try it with a few files, before moving them all.

If you try it, and IF it works, please post a followup...
 
  • Like
Reactions: jeyf
Ok, so I copied the files to an thumb drive. When I did a "get info" on any of them, I don't get the option that you mention about "ignore ownership". That section just looks this:

1619536678400.png

But, I tried to compile it right on the thumb drive, and it worked. So I copied it back to my Mac hard drive, and it seems to compile now as well.

Don't know why that option wasn't there, but it is all working now, so thank you! :)
 
"When I did a "get info" on any of them, I don't get the option that you mention about "ignore ownership"."

No.
This isn't what I asked you to do.

Note:
Before going further, I know the trick I described above works for hard drives.
Perhaps USB flash drives are different. I've never tried it using a flash drive.

But -- here's what I think you are missing.

Once the files are copied to the external drive, you click on the DRIVE ICON itself -- NOT "on any particular file".

Now, do a get info ON THE DRIVE ICON ITSELF -- NOT any any file.

Do the "ignore ownership" ON THE DRIVE ICON ITSELF -- NOT on any file.

You are telling the OS to "ignore" permissions on ALL the files copied from that drive.

Then, just copy the files back.
See if they will open/save without permissions problems now.

If this won't work, I can't help further.
 
"When I did a "get info" on any of them, I don't get the option that you mention about "ignore ownership"."

No.
This isn't what I asked you to do.
Oh, well, like I said, whatever I did, that was not what you said, actually worked. So I probably won't go back and follow your steps to the letter.

Thanks for the help! :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.