Permissions problem mac OS X 10.9.5 server
Permissions problem mac OS X 10.9.5 server
- Subject: Permissions problem mac OS X 10.9.5 server
- From: Jim Weisbin <email@hidden>
- Date: Wed, 14 Jun 2017 14:48:56 -0400
I have a pretty simple script that sets the modification date of a folder (or
multiple folders dragged on) to it’s creation date.
The reason for it is that restores done from Crashplan don’t preserve mod
dates, so this seemed like the best way to at least get them into some usable
date order - my users tend to sort by date modified.
The script runs fine on my laptop, running OS 10.12.5, accessing local files.
It also runs fine when run from my laptop, accessing the files on a server
remotely, via AFP. The server is running OS X 10.9.5.
But when I try to run the script on the server, logged in as the administrator,
it bombs at the line set this_item's modification date to theCreationDate
With this error:
error "Finder got an error: The operation can’t be completed because you don’t
have the necessary permission." number -5000
on open these_items
tell application "Finder"
repeat with i from 1 to the count of these_items
set this_item to (item i of these_items)
if kind of this_item is "Folder" then
set theCreationDate to creation date of
this_item
-- display dialog theCreationDate as string
set this_item's modification date to
theCreationDate
end if
end repeat
end tell
end open
I’m certain that the admin has the permissions to modify these folders. Is it a
limitation of OS X 10.9.5?
I think I could do this with SetFile, but this solution seemed to be the
easiest and quickest to write.
Jim Weisbin | C.T.O. | Human | Post Human | 27 West 20th Street | Suite 801 |
New York, NY | 10011 | (212) 352-0211 | (917) 375-2272 | Los Angeles Office |
2046 Broadway | Santa Monica, CA | 90404 | (310) 264-0211 telephone |
_______________________________________________
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