• 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
[OT] Re: Permission madness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OT] Re: Permission madness


  • Subject: [OT] Re: Permission madness
  • From: email@hidden
  • Date: Thu, 24 Jan 2002 16:31:22 -0500

On Thursday, January 24, 2002, at 01:32 PM, Riccardo Santato wrote:

Hi everybody.

As you know, MacOS X comes with a strong dependence from permission and
user privileges.
I'm looking forward for a document (maybe on Apple's servers) that
explains me the argument, answering some question, such as:

1) What do "system"/"wheel" owner permission means ?
2) Is there an Aqua way to change permissions or just via chmod ?
3) What are the flag bits a common file can have (I need this for my
application...)

1) system and wheel are groups that are given access to areas of the file system for administration purposes.
They are not permissions in themselves but the names of groups (of users) for whom permissions are granted.

2) I don't know if there's a Cocoa interface to permissions on the file system - I'm a Cocoa-newbie myself. :)

3) For REGULAR FILES there are really only 3 permission flags that come into general use: read, write, and execute. Each of these three permissions may be set differently for the USER (owner) of the file, the GROUP owner of a file, and OTHERs (anybody else who is not the user-owner or in the group-owner). A file or directory may be assigned only one group, but a user may be a member of many groups.

So when you see a directory listing in the terminal window (from the "ls -l" command), you see lines of the form:

-rw-r--r-- <#-links> <owner-name> <group-owner-name> <bytes-in-file> <date-modified> <name-of-file>

In this entry, the first 10 characters (-rwx-r--r--) tell you all about the permissions.

The first '-' indicates that the entry is a regular file.
The next three characters [rw-] indicate permissions for the user (owner).
The next three characters [r--] indicate permissions for the group owner.
The next three characters [r--] indicate permissions for everyone not specified above.

r = read
w = write
x = execute
- = permission not granted

So the first "rw-" says that the user has read and write access but not execute.
The second "r--" says that members of the group have read access but not write or execute.
The third "r--" says that everyone else has read access but not write or execute.

The meanings of these permissions change depending on whether or not they are applied to a file or a directory. Also be aware that UNIX-based systems have other "special" file types that users rarely (if ever) interact with. These would include things like character-special device files, block-special device files, pipes, etc.

For detailed information see the following man pages (using the terminal window).

man ls (see description of "long listing")
man chmod
man umask
man 2 chmod
man stat
man chown
man chgrp

Hope that helps,

email@hidden


References: 
 >Permission madness (From: Riccardo Santato <email@hidden>)

  • Prev by Date: How can I standardize a path name?
  • Next by Date: reestablishing IBOutlets from initWithCoder ?
  • Previous by thread: Permission madness
  • Next by thread: Re: Permission madness
  • Index(es):
    • Date
    • Thread