Question about file authorization

Discussion in 'Mac Programming' started by swimlikehell, Apr 15, 2008.

  1. macrumors member

    Joined:
    Aug 31, 2006
    #1
    I have an updater which prompts the user for authorization, but it seems when it updates the files the new files are set with the admin authorization. I was wondering if anyone had any experience with this sort of application and can give me some suggestions of the authorization flags or anything I need to do for this to work. I used the example on apples web site:

    developer.apple.com/documentation/Security/Conceptual/authorization_concepts/03authtasks/chapter_3_section_4.html#//apple_ref/doc/uid/TP30000995-CH206-TPXREF33

    To get what I currently have. any suggestions would be much appreciated.
     
  2. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #2
    What's wrong with that?
     
  3. thread starter macrumors member

    Joined:
    Aug 31, 2006
    #3
    If they do not have write privileges to the app they are updating the privileges should stay the same for that app.
     
  4. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #4
    Ah, I see what your saying.

    As a command line "hack" you could call chmod afterwards to set the correct permissions, but there may be a better way.
     
  5. thread starter macrumors member

    Joined:
    Aug 31, 2006
    #5
    I meant to say the new files have root privileges not admin privileges, I am aware of the chmode command line command but I was looking for an idea that I can put in my code not a hack. Thank you for your help.
     

Share This Page