How can I download a file that has already executable permissions 755 in another server.

I want to: wget https://example.com/pub/register.sh --no-check-certificate

and preserver permission register.sh 755

right now, if after I execute the above command, it change perms to 444 after file downloads. then I have to execute: chmod 700 reg7.sh ; ./register.sh

Any ideas how to do this?


You can't. It's as simple as that. Unix permissions are not transferred by HTTP.

To do this, you would need to use other tools, e.g. rsync or scp.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.