Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Folder Action for changing privileges




Hi all,

For some time now I've been successfully using a script application bundle for changing the permissions of the folder contents dropped onto it and today I tried making it into a folder action and, while it is successfully running, the permissions aren't changing. Here's the code:

on adding folder items to theFolder after receiving theAddedItems
        try
                repeat with thisItem in theAddedItems
                        set FilePath to quoted form of POSIX path of thisItem
                        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

I set the "Other" privileges to "No access" on all the contents, dropped it into the folder with the action set to it, the "success" message appears but permissions are the same. If I drop the same folder onto my bundle (same code) the "Others" permission sets to "Read/write".

All assistance would be most appreciated!

Cheers,

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

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.