sh: ... No such file or directory
Hello there,
While trying to invoke my test shell script via crontab, I am bumping into "sh: my_shell_script.sh: No such file or directory" error message. The same script however executes just fine when invoked manually from the Putty ssh terminal, like "./my_shell_script.sh".
The directory where the script resides exists, has 755 permissions set recursively and I can access it/write into it via my FTP client without any problem.
The script my_shell_script.sh itself is just a test script outputting "Hello world":
#!/bin/bash
echo "Hello world"
The invoking this shell script crontab crontab.txt file goes as follows:
MAILTO=my_email_address@abc.com
30 * * * * sh ./my_shell_script
I know that the cronjob to invoke the my_shell_script.sh gets created as running "crontab -l" plus receiving emails proves.
I've written it under my Ubuntu Linux using Kate editor, so it doesn't contain any Windows generated unnecessary characters. The folder where this shell script resides is 755.
I am not sure if it would help, but I've run echo %PATH and it's output is:
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/dell/srvadmin/bin
Also, this scenario occurs on my remote hosting account which I am allowed to access via SSH.
Looking forward to hearing from honourable gurus.
Cheers
Alex
|
Recent comments
20 hours 22 min ago
1 day 3 hours ago
1 day 6 hours ago
1 day 8 hours ago
1 day 16 hours ago
2 days 2 hours ago
2 days 3 hours ago
2 days 6 hours ago
2 days 11 hours ago
2 days 11 hours ago