Permission Error. Terminal command for mass permission change?

Discussion in 'Mac OS X Server, Xserve, and Networking' started by fmartin2, Feb 3, 2012.

  1. fmartin2 macrumors newbie

    Jan 31, 2012
    I have moved files across to a computer on a network where i didn't log in as the admin before i moved them.

    Now i have lots of files on the new computer that can't be opened because of various permission errors etc.
    I don't have the old computer anymore.

    I have tried putting them in a folder, setting the permissions right and clicking 'apply to enclosed items' but it didn't work.

    It seems the problem comes from the 'everyone' being locked as the "custom access" permission.

    So i was wondering, is there a terminal command that can set the permissions for the files right? If all of the troublesome files were on my desktop.

  2. willieva macrumors 6502

    Mar 12, 2010
    In the folder you want to change:
    chown -R $USER .
    chmod -R +rw .

    chown changes ownership, and will make the user who ran the command the owner.

    -R means recursive, so all subfolders will be affected as well.

    +rw means make the files readable and writeable by the user who issued the command. I'm just guessing that's what you want to do, you might have something else in mind.

    You can do a 'man chmod' for more info.
  3. fmartin2 thread starter macrumors newbie

    Jan 31, 2012

Share This Page