• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSFileOwnerAccountName will not assign to root
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFileOwnerAccountName will not assign to root


  • Subject: NSFileOwnerAccountName will not assign to root
  • From: Prime Coderama <email@hidden>
  • Date: Wed, 21 Mar 2012 12:52:46 +1100

Does anyone know why the assignment of NSFileOwnerAccountName and NSFileGroupOwnerAccountName does not work? The directory created defaults to my account and the staff group.

    NSFileManager *fileManager = [NSFileManager defaultManager];
    NSMutableDictionary *attr = [NSMutableDictionary dictionary];
    [attr setObject:@"root" forKey:NSFileOwnerAccountName];
    [attr setObject:@"wheel" forKey:NSFileGroupOwnerAccountName];
    [attr setObject:[NSNumber numberWithInt:0755] forKey:NSFilePosixPermissions];

    [fileManager createDirectoryAtPath:dir withIntermediateDirectories:TRUE attributes:attr error:&error];
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSFileOwnerAccountName will not assign to root
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: further confusion regarding the release of controls loaded from a nib
  • Next by Date: Re: NSFileOwnerAccountName will not assign to root
  • Previous by thread: Re: Serial I/O over USB
  • Next by thread: Re: NSFileOwnerAccountName will not assign to root
  • Index(es):
    • Date
    • Thread