Re: Folder Action for changing privileges
Re: Folder Action for changing privileges
- Subject: Re: Folder Action for changing privileges
- From: Brett Conlon <email@hidden>
- Date: Mon, 2 Jul 2007 15:29:44 +1100
OK, well it may be just the Finder not
updating the changed permissions in the Get Info dialog under 10.4 coz
I just tried looking at the permissions through Terminal and though the
Finder is showing Others as "No access", Terminal is showing
full rwx. I tested this on my Mac and on one of the other Studio Macs running
10.4 and this seems to be consistent.
Can anyone else confirm this Finder
issue?
But why the permissions correctly appear
changed after dropping it on the Bundle app compared with incorrectly using
the Folder Action, is a mystery.
Cheers,
Coj
Brett Conlon <email@hidden>
Sent by: applescript-users-bounces+brett.conlon=email@hidden
02/07/07 11:32 AM
|
To
| email@hidden
|
cc
|
|
Subject
| Re: Folder Action for changing privileges |
|
Many thanks for responding, J.
Unfortunately it didn't fix my issue.
In fact I have done further testing and the script below fails on my computer
(10.4.9) and 2 other 10.4 systems in the studio (10.4.7 & 10.4.8) but
using the same script on the three 10.3.9 users I tried, it works fine!
So it appears to be a 10.4.x issue - tighter restrictions on setting privileges
or just a bug???
To see if it was processing all of the repeat I added the beep after the
shell script and I get no beep on the 10.4 Macs but the success dialog
shows... weird! On the 10.3 Macs the beep happens, the success dialog appears
and the permissions are changed correctly.
on adding
folder items to theFolder
after receiving
theAddedItems
try
repeat
with
ThisItem
in
theAddedItems
log
ThisItem
set
FilePath
to
quoted form
of
POSIX path
of
(contents
of
ThisItem)
beep
do shell script
"chmod -R 777 " & FilePath
end
repeat
display
dialog "Permissions changed successfully."
buttons
{"Thanks!"} default
button 1
on
error
display
dialog "Changing permissions failed.
Please try it manually" buttons
{"OK"} default
button 1
end
try
end adding
folder items to
Could someone on a 10.4 setup please try this so I know if it is something
specific to our setups?
Ta muchly,
Brett
"J. Stewart"
<email@hidden>
Sent by: applescript-users-bounces+brett.conlon=email@hidden
29/06/07 06:53 PM
|
To
| email@hidden
|
cc
|
|
Subject
| Re: Folder Action for changing privileges |
|
On 6/29/07 at 2:45 AM, Brett Conlon <email@hidden>
spake thusly:
>repeat with thisItem in theAddedItems set FilePath to quoted
>form of POSIX path of thisItem do shell script "chmod -R 777 "
>& FilePath end repeat
You may be getting bitten by a long standing gotcha of repeating
by reference. Try this instead (I didn't test).
repeat with thisItem in theAddedItems
set FilePath to quoted form of POSIX path of (contents of thisItem)
do shell script "chmod -R 777 " & FilePath
end repeat
When you loop using the above form what you are really getting
when you refer to "thisItem' is "item x of theAddedItems"
and
not a file path. The addition of "contents of" to the script
forces it to resolve the reference into the actual file path it contains.
JBS
--
It is inaccurate to say I hate eveything. I am strongly in favor
of common sense, common honesty, and common decency. This makes
me forever ineligible for any public office. - HL Mencken
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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