Problem executing a script

The script startserver.sh has permissions to execute.
Still the nohup command returns error with 'No such file or directory'

Any sugggestions:

[root@linuxserver /opt/app/server]
$ nohup ./startserver.sh &

Error
$ nohup: appending output to `nohup.out'
nohup: cannot run command `./startserver.sh': No such file or directory

where

[root@linuxserver /opt/app/server]
$ ls -lat
total 144
drwxr-xr-x 10 root root 4096 Feb 11 14:33 .
-rwxrwxrwx 1 root root 420 Feb 11 14:32 startserver.sh
-rwxrwxrwx 1 root root 81 Feb 11 14:29 stopserver.sh

Thanks

Hi
try this

$ nohup ./startserver.sh >> OUTFILE.txt &

or

$ nohup sh startserver.sh >> OUTFILE.txt &

always redirect the output of nohup in a file.

Regards,
Pankaj

No Friend , if you will not redirect the output of nohup file it will automatically redirect nohup.out file.

See below thing.

nohup ./time.ksh &
[1] 880924
$ Sending nohup output to nohup.out.

Check first line of the script file :slight_smile:

If it is:

#!/bin/my_personal_private_non_existing_on_your_PC_shell
return 0;

Then it is quite possible that you don't have this binary to execute it.
In this case - system is not able to execute the file. Results will be as in your case.

Try this ksh yourscript - That�s not only fot ksh fscripts and sometimes works for me.