I don't see where you use sudo.
Perhaps it helps if you try:
curl https://cli.pipedream.com/install > /tmp/sd_insta.sh && \
sudo sh /tmp/sd_insta.sh
In your configuration: Even if you call the
curl command with
sudo that command pipes the output to a shell command which is not called with a sudo. And I expect the shell call will do the copy that was denied, because it has no right to write to /usr/local/bin.
My idea was to download the installer script to a scriptfile in the temp-Folder (
/tmp). To do this you don't need special rights because /tmp should be writable for everyone.
If the download succeeded (the
&& executes the following command only if the previous command succeeded) I execute the downloaded script in a shell that was startet with sudo.
If you perform the following
ls -l /usr/local/bin
It should output something like:
drwxrwsr-x 2 root staff 4096 Nov 13 2018 bin <--------- bin folder
drwxrwsr-x 2 root staff 4096 Nov 13 2018 etc
drwxrwsr-x 2 root staff 4096 Nov 13 2018 games
drwxrwsr-x 2 root staff 4096 Nov 13 2018 include
drwxrwsr-x 4 root staff 4096 Nov 13 2018 lib
You see that the bin folder is flagged with `drwxrwsr-x'
d: -> it's a folder/directory
rwx -> it's readable, writeable and executable for the owner ("root")
rws -> it's readable, writeable for the group ("staff") and has the setuid flag set.
r-x -> it is readable and executable but not writable for everyone.
For a folder/directory executable means that the granted subject/login-name can
cdinto the folder.
The setuid flag has no meaning for this problem. Used for directories, it adds the same groupname ("staff") to every file or folder that's created in the flagged (bin) folder.
If you get the same output root should be allowed to copy the pd programm int
ls -l /usr/local/
returns something other like
dr-xrwsr-x 2 root staff 4096 Nov 13 2018 bin
then you probably excluded event root from writing into the folder.
In this case you can repair it with
sudo chmod 775 /usr/local/bin
sudo chmod g+s /usr/local/bin