Apple’s Worldwide Developers Conference to kick off June 10 at 10 a.m. PDT with Keynote address

The Keynote will be available to stream on apple.com, the Apple Developer app, the Apple TV app, and the Apple YouTube channel. On-demand playback will be available after the conclusion of the stream.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Automator quick action needs fixing

Hi,


I have been successfully using an Automator quick action on my old Macbook Pro, until I switched to a new Macbook Pro 13" M1 with BigSur. The quick actions have been imported from the old Macbook Pro to the new one through Time Machine restore.


The quick action was designed to ask on selected Finder files. It was doing three things :

1) changing their properties (chmod command) to clear the ownership,

2) changing their tag colour to green, and

3) copying them to another folder on my disk. This folder is synchronised and shared with external people through Dropbox.


Recently, Big Sur displays an error message when running this quick action. I cannot seem to figure out what to do to solve it.


Here is the error message. It says it is unable to change file mode:


And here is the quick action in Automator:


Is there a way I can fix this to work with Big Sur.


By the way, as far as i recall, the changing of ownership through chmod command was made necessary for the sharing with external people I believe.


Thank you.

Lance


MacBook

Posted on Jan 21, 2021 12:14 AM

Reply
Question marked as Best reply

Posted on Jan 21, 2021 9:56 AM

Problem solved. For some reasons, the files I wanted to apply the quick action onto were "locked". So in order to unlock them first, i inserted an Apple Script in my quick action (just before the Shell script) which reads:

on run {input, parameters}

tell application "Finder"

repeat with theItem in input

set locked of theItem to false as boolean

end repeat

end tell

return input

end run


it does the job of unlocking the files first before to change their permissions.


I haven't figured out yet why the files are now "locked", especially the PDF ones.

Similar questions

3 replies
Question marked as Best reply

Jan 21, 2021 9:56 AM in response to lanceloz

Problem solved. For some reasons, the files I wanted to apply the quick action onto were "locked". So in order to unlock them first, i inserted an Apple Script in my quick action (just before the Shell script) which reads:

on run {input, parameters}

tell application "Finder"

repeat with theItem in input

set locked of theItem to false as boolean

end repeat

end tell

return input

end run


it does the job of unlocking the files first before to change their permissions.


I haven't figured out yet why the files are now "locked", especially the PDF ones.

Jan 21, 2021 12:19 PM in response to lanceloz

The shell version of your AppleScript, providing the file was not locked by a system process, is:


for f in "$@"
do
   chflags nouchg "$f"  # remove the user level lock on the files
   chmod u=rwx,g=rx,o=rx "$f"  # same as 755. no -R as these are files, not folders
done


If the files were locked by a system process, then you will need the following with a sudo password:


sudo chflags noschg "$f"


Automator quick action needs fixing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.