Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Oct 25, 2012, 11:34 AM   #1
macrumors member
Join Date: Apr 2008
Applescript to Change File Permissions

Hello everyone, I have what I hope is an easy question that I just can't find the answer for...

I have a folder under the /Users/Shared/Pictures on my hard drive. This folder contains Lightroom catalog files and other things. When I create a new Lightroom catalog from my account I save it there. My wife has a user account on the same computer and she likes to be able to the pictures I save into Lightroom. In order to do this, I have to change the permissions on the file everytime.

Right now, my process is read pictures onto computer, import them into a newly created lightroom library (if needed), then using the terminal change the file permissions of the top Pictures folder so that she can read and write to everything in there.

I was wondering if there is a way to create an AppleScript that would allow me to have an icon on the desktop that I could click and then have it automatically go and change the permissions on this folder.

Is that possible? Thanks.
hfthomp is online now   0 Reply With Quote
Old Oct 25, 2012, 02:19 PM   #2
macrumors 6502a
Join Date: Mar 2012
Location: Belgium
Try this :

set thePath to "/Users/Shared/Pictures"
set theResult to button returned of (display dialog "This will change permissions on the " & thePath & " folder." with title "Change File Permisssions" buttons {"Cancel", "OK"} default button 2)
if theResult is "OK" then
	set theCommand to do shell script "your terminal command here eg chmod " & quoted form of thePath
end if

-- or without the dialog
		do shell script "your terminal command here eg chmod " & quoted form of thePath
Save as an application and put it on your desktop or drag it into the Finder Toolbar.
Space Corps Directive 34124

Last edited by kryten2; Oct 25, 2012 at 02:50 PM.
kryten2 is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Osx file permissions AshMan Mac OS X Server, Xserve, and Networking 1 Sep 21, 2013 10:57 PM
cannot rename file names of folders, files, or change case of file extensions Sossity Mac Basics and Help 8 Apr 2, 2013 05:38 AM
OSX file sharing permissions Drew80 OS X 11 Jan 11, 2013 07:16 PM
File Permissions Confusion? 2012Tony2012 iMac 4 Dec 7, 2012 03:34 PM
Repair disk permissions with applescript 1theo0 Mac Programming 3 Dec 2, 2012 09:52 PM

Forum Jump

All times are GMT -5. The time now is 09:22 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC