How to reset default permissions after the result of running the chown command

command linepermission

I ran this line in Terminal:

sudo chown -R $USER /usr/local

Now I want to reverse it to the default permissions. How do I do that?

(I think the default owner is system)

Best Answer

By default /usr/local is owned by root and the directories under that don't exist so there could be odd users under that, if so the restore as per patrix's answer otherwise

The most usual setup in Unix/Linux is to have them all owned by root. So

sudo chown -R root /usr/local

There is no such user as system by default,