I have a somewhat strange issue. I have a bash script to do an application install. If I download it from an ftp it simply doesn't work. All commands fail. However if I create the script on my server and put in the exact same commands it runs without an issue.
I thought at first it was permissions related so I tried taking ownership, changing permissions but it still does not run.
To test I then created a simple script to add some firewall rules and it does exactly the same thing. It can not find the firewall service and complains about illegal commands and yet if I create then run the script in the same folder manually it works with no issue.
Has anyone seen this before?
Downloaded script will not work
Re: Downloaded script will not work
Does it work if you run dos2unix against the downloaded file?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 2
- Joined: 2017/10/20 14:29:56
Re: Downloaded script will not work
Awesome! The encoding change to unix did the trick. Thanks for the help!
Re: Downloaded script will not work
There's an ftp option to do that automatically.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke