Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have just removed Macports. After that I did some random checks in directories and found out that some files still have Macports as their owner. So I did a 'find' on all files that have Macports as their owner and I was shocked by the results. Tons of images, Spotify files, crashlogs that had absolutely nothing to do with Macports are apparently owned by Macports (while Macports has been removed according to their own uninstall instructions).

Now I am in no means a good administrator but when I remove something it would be nice if everything will be reverted to its former state. Plus on top of that I don't even know why Macports would take ownership of all those files.

So...

  1. Can anyone explain to me how this could have happened and what I can do to prevent it from happening again should I want to use Macports again.
  2. How can I safely reclaim ownership? The problem is that I don't even know "who" used to be the owner of the files at hand.
share|improve this question

1 Answer 1

up vote 0 down vote accepted

If the files should be owned by you, you could do something like this:

sudo find ~ -user macports -exec chown $USER {} +

I have also uninstalled MacPorts and I still had a user named macports, but there were no files owned by it.

share|improve this answer
    
Thanks for your answer Lauri, could you please explain to me what the {} + part does exactly? –  Jesper Purola Jul 16 '13 at 15:44
    
See man find. {} is a placeholder for arguments, and + tells -exec to take multiple arguments at a time. –  ؘؘؘؘ Jul 17 '13 at 8:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.