100 | | |
101 | | If you attempt to run the `./restore_ports.tcl` script, and the shell gives you an "Operation not permitted" error, then the problem may be that macOS marked the script file as "quarantined". macOS does this for executable files downloaded from the internet. There are various ways to remove this quarantine, but `xattr -d` is one simple way. Another is to open `./restore_ports.tcl` with a text editor, and save it with a different filename, `./restore_ports2.tcl`. |
102 | | {{{ |
103 | | % sudo ./restore_ports.tcl myports.txt |
104 | | sudo: unable to execute ./restore_ports.tcl: Operation not permitted |
105 | | % ls -l@ ./restore_ports.tcl |
106 | | -rwxr-xr-x@ 1 myuser staff 9474 22 Oct 10:57 ./restore_ports.tcl |
107 | | com.apple.quarantine 21 |
108 | | % xattr -d com.apple.quarantine restore_ports.tcl |
109 | | % sudo ./restore_ports.tcl myports.txt |
110 | | [... script runs normally ...] |