1

When I run Applescript from a working shell script I get an error: Operation not permitted

This is the shell script and it works fine in terminal:

sudo /Users/mbp115/Downloads/ntfs-3g_ntfsprogs-2021.8.22/src/ntfs-3g /dev/disk0s3 /Volumes/Bootcamp

This is the AppleScript and it gives me an error:

on run {input, parameters}
do shell script "sudo /Users/mbp115/Downloads/ntfs-3g_ntfsprogs-2021.8.22/src/ntfs-3g /dev/disk0s3 /Volumes/Bootcamp" with administrator privileges
return input

end run

The error message is:

Syntax error
/bin/sh: /Users/mbp115/Downloads/ntfs-3g_ntfsprogs-2021.8.22/src/ntfs-3g: Operation not permitted

1 Answers1

1

This Apple script worked although not as elegant as I wanted. No need for additional access:

on run {input, parameters}
tell application "Terminal"
    activate
    set shell to do script " sudo /Users/mbp115/Downloads/ntfs-3g_ntfsprogs-2021.8.22/src/ntfs-3g /dev/disk0s3 /Volumes/Bootcamp"

end tell

return input

end run

After installing the binary in /usr/local/bin the original Apple Script worked flawlessly.

on run {input, parameters}
do shell script "/usr/local/bin/ntfs-3g /dev/disk0s3 /Volumes/Bootcamp" with administrator privileges
return input

end run