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?
Best Answer
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
orscp
.