Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Script Not Running
Script Not Running
I am trying to run this script on Debian;
#!/bin/bash
#
# Debian
#
set -v
apt-get -y update
apt-get install -y ntpdate
apt-get install -y squid3 apache2-utils
cp /etc/squid3/squid.conf /etc/squid3/squid.conf.bak
cat << EOF > /etc/squid3/squid.conf
http_port 3128
http_access allow all
cache deny all
forwarded_for delete
request_header_access Via deny all
EOF
/etc/init.d/squid3 restart
echo "IP ADDRESS"
curl ifconfig.co
#Be sure to shutdown/terminate your VM after you are done!
When I upload it and run the script using;
chmod +x proxy-debian-linux_.sh
sudo ./proxy-debian-linux_.sh
I get the error; cannot access:"Proxy-Debian-Linux" no such file or directory. How is this? Why is this? Thank you so much for you help.
#!/bin/bash
#
# Debian
#
set -v
apt-get -y update
apt-get install -y ntpdate
apt-get install -y squid3 apache2-utils
cp /etc/squid3/squid.conf /etc/squid3/squid.conf.bak
cat << EOF > /etc/squid3/squid.conf
http_port 3128
http_access allow all
cache deny all
forwarded_for delete
request_header_access Via deny all
EOF
/etc/init.d/squid3 restart
echo "IP ADDRESS"
curl ifconfig.co
#Be sure to shutdown/terminate your VM after you are done!
When I upload it and run the script using;
chmod +x proxy-debian-linux_.sh
sudo ./proxy-debian-linux_.sh
I get the error; cannot access:"Proxy-Debian-Linux" no such file or directory. How is this? Why is this? Thank you so much for you help.
Re: Script Not Running
Hi.
It happened to me before.
Then I found that my script was edited in windows so that it was "dos" fileformat, which cause bash can not interpret the script and reply "no such file or directory".
Try to edit the script at vim.
Then
If you got "ff=dos",then
It happened to me before.
Then I found that my script was edited in windows so that it was "dos" fileformat, which cause bash can not interpret the script and reply "no such file or directory".
Try to edit the script at vim.
Then
Code: Select all
:set ff
Code: Select all
:set ff=unix
Last edited by nova_nul on 2017-03-10 09:37, edited 1 time in total.
Nice to meet you , too.
Re: Script Not Running
I figured out how to do it but I got:
ff=unix
Since that is the case why is it not working?
ff=unix
Since that is the case why is it not working?
Re: Script Not Running
This may or may not be your problem, but either you're mistyping the name of the script when you run it, or you mistyped it in your description of your problem. (*nix filenames are case-sensitive.)spen24423 wrote:chmod +x proxy-debian-linux_.sh
sudo ./proxy-debian-linux_.sh
I get the error; cannot access:"Proxy-Debian-Linux" no such file or directory. How is this? Why is this? Thank you so much for you help.
What's the ouput of
Code: Select all
ls -l
-
- Posts: 1394
- Joined: 2007-03-04 21:10
- Location: U.S.A. - WI.
Re: Script Not Running
Make sure the filesystem / area you have uploaded the script to is not mounted noexec ( for security purposes ). This is often done for public / semi public FTP upload dirs as an additional level of security.
That and as dasein said: unix / linux is generally CaSe SenSiTive.
That and as dasein said: unix / linux is generally CaSe SenSiTive.
fortune -o
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Your love life will be... interesting.
How did it know?
The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches
Re: Script Not Running
Thank you to all of you for the help!
This time when I uploaded the file and ran the script I still got the error, but when I ran ls -l the script name popped up in green.
This time when I uploaded the file and ran the script I still got the error, but when I ran ls -l the script name popped up in green.
Re: Script Not Running
Hi.
The name of script is green because the executable file is grenn by default.
Maybe you should post what was popped up(all output of 'ls -l').
The name of script is green because the executable file is grenn by default.
Maybe you should post what was popped up(all output of 'ls -l').
Nice to meet you , too.
Re: Script Not Running
Ouput of "ls -l":
spencerbolling@instance-1:~$ ls -l
total 4
-rwxr-xr-x 1 spencerbolling spencerbolling 475 Mar 11 04:51 Proxy-Debian-Linux.sh
How do I check and change the mounted noexec?
spencerbolling@instance-1:~$ ls -l
total 4
-rwxr-xr-x 1 spencerbolling spencerbolling 475 Mar 11 04:51 Proxy-Debian-Linux.sh
How do I check and change the mounted noexec?
-
- Posts: 1100
- Joined: 2016-01-07 12:25
- Has thanked: 5 times
- Been thanked: 16 times
Re: Script Not Running
looks like a typo in your command, you will need to type the filename correctly for it to be found including underscores (or without depending which post is correct)