How to force permissions to change.

Discussion in 'macOS' started by dogbone, Apr 6, 2006.

  1. dogbone macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #1
    On one of my emacs it sometimes tells me I don't have permission to replace an item in the applications folder and doesn't even ask for authentication.

    I went to change all the permissions in the applications folder so that the owner was the system (some of the items have an unknown owner) and admin could read and write. But when I clicked apply to all items in folder it wouldn't let me as it said I didn't have permission even though I used an admin account.

    Rather than search through all the 124 items in the applcation folder one by one I was wondering if I can use terminal to force all the permissions to change.

    Also is it OK to make the owner of self installed apps, the 'System'?
     
  2. KD7IWP macrumors 6502a

    KD7IWP

    Joined:
    Mar 8, 2004
    Location:
    American living in Canada
    #2
    Can you do something like chmod 777 on the folder?
     
  3. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #3
    it that the full terminal command after the prompt.

    So I just change directories with cd/Applicaions and then type in

    chmod 777


    it that the full terminal command after the prompt.
     
  4. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #4
    I wouldn't recommending using chmod when you aren't more familiar with what it does and how it might affect your applications.

    Perhaps there is a better way to deal with the problem. You might do the following and see what results it produces:

    Control-click on file Calculator.app in your Applications folder and select Get Info. Open the disclosure triangle next to Ownership & Permissions. Open the disclosure triangle next to Details too. What settings do you have for Owner, Access, Group, Access, and Others?

    Also, if you click the lock symbol next to Owner, does it ask for your administrator password?​
    Two other questions:

    1. If you look at System Preferences -> Accounts, is the "Allow user to administer this computer" checkbox checked for the user name you use to log in?

    2. Do you have any guess as to what might have made this computer different than the other Macs, where you don't have this problem?

    Note: If you really want to use chmod, I think you'd use a (dangerous) command like this:
    Code:
    sudo chmod -R 777 /Applications/Calculator.app
    but I'm not going to test it on my own system to check! If you decide to do this, I suggest repairing permissions afterwards.
     
  5. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #5
    Yes I'm an admin user.

    Some of the apps like printer repair utility have the ownership as 'Unknown'

    Some like photoshop have the owner as system (probably because I changed it in the past for similar problems)

    The reason the permissions are screwed is because I no longer use the emac it's used by my wife and I deleted my account and made her the sole admin user.

    What I don't understand is that it did not ask for authentication it just said I didn't have permission for some of the enclosed items!

    The calculater apps is Owner: system, Group: Admin, which is what I'd expect.

    My plan was to change all the apps in the App folder to Owner: me, Group: Admin, and then do a repair permissions to change all the system apps back to Owner: System. And that would hopefully solve all future problems.

    I understand the danger of making a mistake with Terminal, I recently deleted my System folder because I left off a closing quote. But that was my fault for not triple checking.

    These are my questions.

    One: Assuming that I don't make any errors with the with the terminal command could/would sudo chmod -R 777 /Applications do any harm if I did a repair permissions afterwards and would it change everything inside the app folder.

    Two: Could terminal also be used to change the Application folder and everything in it to Owner: System, Group: Admin and if there is only a single admin user for the computer does it matter if the owner of a self installed app is System, or does it have to be the user?

    Three:

    My ideal Terminal command would be to change everything inside the app folder to Owner: me, User: Group and all the permissions to be 777 then I'd do a repair permissions afterwards
     
  6. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #6
    I see that you understand what's going on and your explanation makes sense. Since the previous admin account is gone (probably not really gone; just no longer known by its name), the current state of the system is a result we might have expected.

    I now think that permissions are not the problem. Instead, directory and file ownerships are the problem. This can be changed with the chown command. This command would change the ownership and group ownership of one application and all of its files:
    Code:
    sudo chown -R root:admin /Applications/Calculator.app
    This would change it for all applications:
    Code:
    sudo chown -R root:admin /Applications/*.app
    Changing them to root:admin should produce ownership by "system" as shown in the Get Info window. Another choice for some or all applications would be to change them to wifeusername:admin where wifeusername is your wife's user name, since that's the sole user who is an administrator.

    It is possible (but I don't know if it is likely) that an application would be unhappy to have particular files with permissions 777. I know certain server-style applications that are unhappy to find some of their files having world-writable permissions, but I can't think why a typical Mac OS X application would mind. Repairing permissions can correct permissions only for applications whose correct permissions are in a manifest, which should be true for all of the Apple ones but possibly not for some third-party apps you installed. So the answer to your question is maybe.

    On a one-user computer it shouldn't matter which you choose. I haven't tested this, but I would assume that if you set them to root:admin, you will be prompted if you try to replace an application. If you set them to wifeusername:admin then when logged in as wifeusername I'd think you could replace them successfully without getting prompted. I think getting prompted is to be preferred, meaning that root:admin is best.

    I suggest trying the chown command on one application that gives you trouble, as a test. Perhaps that alone will be enough to solve the problem.

    A hindsight lesson from all of this: As a general rule, it's best not to remove the account of the original administrator, or a user who has installed applications you will keep using. If you don't want an old account to be used, change its password but leave the account defined.
     
  7. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #7
    Thanks for your reply. Yes I see now why apps are better grouped as Admin. And a little light has clicked on after reading the rest of the post.

    I'm sorry but I lost track of time and missed your post, then got a little impatient and started another thread, which I'll post a link to here in order to keep the macrumours knowledge base synced.
     
  8. faraz007, May 17, 2013
    Last edited: May 18, 2013

    faraz007 macrumors newbie

    Joined:
    Jul 29, 2012
    #8
    so how to kill this command?!:confused:
    I mean that how to fix it , because it makes my mac hot
     

Share This Page