"Cannot open" error on executable shell script

"Cannot open" error on executable shell script

Post by Ken Janusk » Sun, 19 Nov 2000 13:30:05



I have an korn shell script that I use on a daily basis to monitor
behavior of our Solaris server. Actually it just opens up a menu that,
based on selection, then runs other korn shell or perl scripts. It's
worked fine for last 2 years.

But yesterday I wanted to let another user use it. So I set permissions to
+x for everyone. But everytime he tries to run it he gets the error:
/usr/bin/ksh pathToFile/myScript.ksh cannot open.

I'm used to permission denied errors but I've never seen "cannot open"
before. Still it sounds like a pretty basic type of error.

Cannot anyone shed some light?

Thanks in advance,

Ken

--
Posted via CNET Help.com
http://www.help.com/

 
 
 

"Cannot open" error on executable shell script

Post by bmar.. » Sun, 19 Nov 2000 04:00:00



   >I have an korn shell script that I use on a daily basis to monitor
   >behavior of our Solaris server. Actually it just opens up a menu
   >that, based on selection, then runs other korn shell or perl
   >scripts. It's worked fine for last 2 years.
   >But yesterday I wanted to let another user use it. So I set
   >permissions to +x for everyone. But everytime he tries to run it he
   >gets the error: /usr/bin/ksh pathToFile/myScript.ksh cannot open.
   >I'm used to permission denied errors but I've never seen "cannot
   >open" before. Still it sounds like a pretty basic type of error.
   >Cannot anyone shed some light?
Script files must have +rx permission.

Net-Tamer V 1.08X - Test Drive

 
 
 

"Cannot open" error on executable shell script

Post by infam » Mon, 20 Nov 2000 10:18:33


check if the first line has the right path to the korn shell. it may be a
different path for him than it is for you


 
 
 

"Cannot open" error on executable shell script

Post by Ken Janusk » Mon, 20 Nov 2000 13:30:08


Thanks,

I actually solved my own problem and posted it but it hasn't yet appeared
here. I figured it was probably going to be something obvious but that I
just didn't see. The problem was that all scripts need to be not just
executable but also readable. I didn't have read bit set for other users
and my co-worker happened not to be in my group so was trying to run
script as other. From now on I'll make sure that all my scripts have the
readable bit set as well as executable.

Thanks for reply,

Ken


> check if the first line has the right path to the korn shell. it may be a
> different path for him than it is for you



--
Posted via CNET Help.com
http://www.help.com/
 
 
 

"Cannot open" error on executable shell script

Post by Ken Janusk » Tue, 21 Nov 2000 04:00:00


Just replying to my own message. I figured this was something simple but
something that I was nonetheless missing. Though everyone had execute
permissions on script not everyone had read permissions. Once I gave read
permissions to all the problem went away.


> I have an korn shell script that I use on a daily basis to monitor
> behavior of our Solaris server. Actually it just opens up a menu that,
> based on selection, then runs other korn shell or perl scripts. It's
> worked fine for last 2 years.

> But yesterday I wanted to let another user use it. So I set permissions
to
> +x for everyone. But everytime he tries to run it he gets the error:
> /usr/bin/ksh pathToFile/myScript.ksh cannot open.

> I'm used to permission denied errors but I've never seen "cannot open"
> before. Still it sounds like a pretty basic type of error.

> Cannot anyone shed some light?

> Thanks in advance,

> Ken

> --
> Posted via CNET Help.com
> http://www.help.com/

--
Posted via CNET Help.com
http://www.help.com/