• 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
Re: User Privileges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User Privileges


  • Subject: Re: User Privileges
  • From: Aaron <email@hidden>
  • Date: Fri, 06 Jan 2012 09:28:01 -0800

On Jan 6, 2012, at 7:05 AM, Luther Fuller wrote:

Here's the problem ...
User "B" is logged in and, via an AppleScript, wants to get the privileges assigned to him by user "A".
As far as I can determine, this is impossible.

The script can ask for the 'owner' of the item --> "A",
and can ask for the owners privileges,
but I can find no command in AppleScript which can
1. ask if "B" is an assigned user of the item; and
2. ask for the privileges of user "B".

Does anyone know how to do this?


Perhaps you could use 'ls' to get the permissions?

Eg. Permissions.txt, created and owned by user_a

2820-mp:~ user_a$ ls -le permissions.txt 
-rw-r--r--  1 user_a  user_group  0 Jan  6 09:17 permissions.txt

There are no ACL's on the file, so it's straight unix permissions.

Suppose, further, that user "A" adds user "B" to the item and sets privileges for that user.
When that happens, that goes beyond unix permissions and it is now an ACL on the file. After adding read privileges for User B, this is what it looks like using ls.

2820-mp:~ user_a$ ls -le permissions.txt 
-rw-r--r--+ 1 user_a  user_group  0 Jan  6 09:17 permissions.txt
 0: user:user_b allow read,readattr,readextattr,readsecurity

And if I add Read & Write permissions from the get info window, it looks like
2820-mp:~ user_a$ ls -le permissions.txt 
-rw-r--r--+ 1 user_a  user_group  0 Jan  6 09:17 permissions.txt
 0: user:user_b allow read,write,append,readattr,writeattr,readextattr,writeextattr,readsecurity

So perhaps you can get the proper permissions info from ls?











 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >User Privileges (From: Luther Fuller <email@hidden>)

  • Prev by Date: User Privileges
  • Next by Date: Re: User Privileges
  • Previous by thread: User Privileges
  • Next by thread: Re: User Privileges
  • Index(es):
    • Date
    • Thread