Jump to content


Setting up Shared Permissions - Show #435 2013.03.13

permissions sharing os x ACL POSIX

  • Please log in to reply
1 reply to this topic

#1 MacCast


    King Mac Geek

  • Root Admin
  • 1,188 posts
  • Twitter:maccast
  • Gender:Male
  • Location:San Diego, CA

Posted 19 March 2013 - 10:38 PM

Listener Alan had a great idea to use a little AppleScript and Folder Actions to solve the issue of creating a folder that could share documents and files between two user accounts on the same Mac.


In MacCast dated 2013.03.13, listener Dan asked for an easier way to save files to the users 'Public' folder so that they could be edited by other users. I thought that this is a problem that could be solved by using a folder action through Applescript. Below is an Applescript which changes permissions to (-rw-r--rw-) of any file placed into the folder in what I think is an elegant albeit very geeky way. Although not as nerdy as ACL's.   ;-) 
on adding folder items to targetFolder after receiving addedItems
set myList to every item of addedItems
repeat with i from 1 to the count of myList
tell application "System Events"
set posixPath to the POSIX path of item i of myList
do shell script ("chmod 664 " & "'" & posixPath & "'")
end tell
end repeat
end adding folder items to
Save this script as an application in the user's Library folder under "Scripts/Folder Action Scripts"
or if you want every user to be able to have the same functionality, save the application to the system library 
"/Library/Scripts/Folder Action Scripts". Create the folder if it isn't present.
Next step is to right/control click on the folder that has shared access, select "Folder Actions Setup" and select the folder action you just saved and thats it
This script works for 1 or more files transferred into the shared folder, and works irrespective of how you put files into it (saving, dragging, copy/paste).

#2 haivu


    Uber Mac Geek

  • Members
  • 278 posts
  • Gender:Male
  • Location:Mill Creek, WA

Posted 18 April 2013 - 12:21 PM

I like the solutions Adam and others suggested so far. However, I am trying to think outside the box (literally and figuratively) and came up with a couple of solutions. They might or might not be what the original listener want.


The first solution proposes using external storage and format it to FAT32. The external storage could be a USB key (AKA thumb drive), an old SD card that you no longer use, or an external hard drive. This solution has a couple of advantages:

  • No permission to deal with, since FAT32 does not support it
  • Simple to implement and use
  • In the case of SD card: since the card is almost flushed into the Mac, you even forget that it is there

The disadvantages include:

  • Depend what you already had, you might have to spend some money
  • One port (USB, firewire,...) is tied up
  • In the case of SD card: the SD slot is tied up. If you need that slot often, this solution might not work well for you.

Solution #2: use Dropbox. Who said Dropbox sharing has to work across different machines? Other services such as box.com, skydirve, Google Drive, might work also.


Solution #3: If you have a Time Capsult (Apple's router and hard drive combo), create a common user account and connect to it.

Also tagged with one or more of these keywords: permissions, sharing, os x, ACL, POSIX

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users