Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A question of permissions.

0 views
Skip to first unread message

Richard Tibbetts

unread,
Nov 25, 2000, 3:00:00 AM11/25/00
to
I'm fairly embarrassed to ask this, but I can't see why I'm having the
following problem (and as it's the weekend I don't know who else to
ask!):

$ who am i
cyborg ttyp3 Nov 25 12:40
$ id
uid=200(cyborg) gid=100(cyborg)
groups=100(cyborg),50(group),102(cybdev)
$ pwd
/u3/cyborg45/bin
$ l runonline
-rwx--x--x 1 cyborg45 cyborg 211 Nov 24 09:34 runonline
$ type runonline
runonline is hashed (./runonline)
$ runonline
/bin/ksh: ./runonline: cannot open
$

Why won't it run the script runonline?

Many thanks in advance!
--
Richard Tibbetts
http://www.primepeace.ltd.uk/

Robin

unread,
Nov 25, 2000, 3:00:00 AM11/25/00
to ric...@primepeace.ltd.uk
Richard Tibbetts wrote:
>
> I'm fairly embarrassed to ask this, but I can't see why I'm having the
> following problem (and as it's the weekend I don't know who else to
> ask!):
>
> $ who am i
> cyborg ttyp3 Nov 25 12:40
> $ id
> uid=200(cyborg) gid=100(cyborg)
> groups=100(cyborg),50(group),102(cybdev)
> $ pwd
> /u3/cyborg45/bin
> $ l runonline
> -rwx--x--x 1 cyborg45 cyborg 211 Nov 24 09:34 runonline
> $ type runonline
> runonline is hashed (./runonline)
> $ runonline
> /bin/ksh: ./runonline: cannot open
> $
>
> Why won't it run the script runonline?

wild guess, you are not the script owner, just a group member ... group
has execute but not read permisions .. try chmod 755 ing it ..
(assuming that that is what ksh is trying to say here .. I am only
familiar with bash) certainly with perl they wont run in execute only
you need read as well ... depends whats in the script I guess

ps is this cyborg as in the cobolesque pyroll thing or something else?

r.

Richard Tibbetts

unread,
Nov 25, 2000, 3:00:00 AM11/25/00
to
Robin <n...@rszemeti.demon.co.uk> wrote:

I did wonder about that - I'll give it a try!

>
>ps is this cyborg as in the cobolesque pyroll thing or something else?
>
>r.

Well spotted! Were have you come across it? (It's my thang, as they
say, as you'll see from my web page;-))

RussM

unread,
Nov 25, 2000, 3:00:00 AM11/25/00
to
In article <pudv1t0acfbsk1j3n...@4ax.com>, Richard Tibbetts
<ric...@primepeace.ltd.uk> writes

>I'm fairly embarrassed to ask this, but I can't see why I'm having the
>following problem (and as it's the weekend I don't know who else to
>ask!):
>
>$ who am i
>cyborg ttyp3 Nov 25 12:40
>$ id
>uid=200(cyborg) gid=100(cyborg)
>groups=100(cyborg),50(group),102(cybdev)
>$ pwd
>/u3/cyborg45/bin
>$ l runonline
>-rwx--x--x 1 cyborg45 cyborg 211 Nov 24 09:34 runonline
>$ type runonline
>runonline is hashed (./runonline)
>$ runonline
>/bin/ksh: ./runonline: cannot open
>$
>
>Why won't it run the script runonline?
>
>Many thanks in advance!
Can you cat it ?
run file ./runonline to see what file type it thinks it is.

One possibility is if you've transferred it from a Windoze/DOS box it has ^M on the
end of each line. That tends to screw scripts up a treat.
-- ----------------------------------------------------------------------------
| Why can't men get Mad Cow disease? |
| Virtual Environment Resource Group Enterprise |
| < mailto:Ru...@verge.demon.co.uk > |
| < http://www.verge.demon.co.uk/index.htm > |
| 'Cause all men are PIGS! (ex-)girlfriend |
-------------------------------------------------------------------------------

Robin

unread,
Nov 25, 2000, 3:00:00 AM11/25/00
to
Richard Tibbetts wrote:

> >
> >ps is this cyborg as in the cobolesque pyroll thing or something else?
> >
> >r.
>
> Well spotted! Were have you come across it? (It's my thang, as they
> say, as you'll see from my web page;-))

a mate of mine is Cyborg contractor ... its a funny old thing innit, but
seems theres still enough $BIGCORP using it and too few people with clue
to maintain it...

--
robin

n...@rszemeti.demon.co.uk but replace ng with my name

I _really_ hate spam .....

Richard Tibbetts

unread,
Nov 26, 2000, 3:00:00 AM11/26/00
to
RussM <Ru...@nospam.demon.co.uk> wrote:

No, it's fine if I run it from a different user. I'm pretty sure the
problem is due to the lack of read permission. I've been told that
SCO needs this to execute the script - I'll check this tomorrow.

Matt Foster

unread,
Nov 26, 2000, 3:00:00 AM11/26/00
to
Richard Tibbetts <ric...@primepeace.ltd.uk> wrote:
> RussM <Ru...@nospam.demon.co.uk> wrote:

>>>$ who am i
>>>cyborg ttyp3 Nov 25 12:40
>>>$ id
>>>uid=200(cyborg) gid=100(cyborg)
>>>groups=100(cyborg),50(group),102(cybdev)
>>>$ pwd
>>>/u3/cyborg45/bin
>>>$ l runonline
>>>-rwx--x--x 1 cyborg45 cyborg 211 Nov 24 09:34 runonline
>>>$ type runonline
>>>runonline is hashed (./runonline)
>>>$ runonline
>>>/bin/ksh: ./runonline: cannot open
>>>$
>>>
>>>Why won't it run the script runonline?
>>>

Shell scripts need read & execute to work. After all, what happens
is that ksh (or bash or whatever) starts up (#!/bin/ksh) and then
attempts to read in the rest of the script as it's stdin.
No read permission, so it blows. Compiled executables don't
suffer from this, but all scripted languages do. 755 or 750 or 700
would be normal permissions for scripts.

Matt

RussM

unread,
Nov 28, 2000, 3:00:00 AM11/28/00
to
In article <8vs79h$704$1...@thor.our.house>, Matt Foster
<ma...@molnir.demon.co.uk> writes

>Shell scripts need read & execute to work. After all, what happens
>is that ksh (or bash or whatever) starts up (#!/bin/ksh) and then
>attempts to read in the rest of the script as it's stdin.
>No read permission, so it blows. Compiled executables don't
>suffer from this, but all scripted languages do. 755 or 750 or 700
>would be normal permissions for scripts.

Don't you just hate that.
The pure simple blindingly obvious taken for granted logical reason that
just never makes it past the tip of the tongue.

It's one of the things I like about *nix, if you sit down and look the
answer is usually starring back at you.

Richard Tibbetts

unread,
Nov 29, 2000, 3:00:00 AM11/29/00
to
RussM <Ru...@nospam.demon.co.uk> wrote:

>In article <8vs79h$704$1...@thor.our.house>, Matt Foster
><ma...@molnir.demon.co.uk> writes
>>Shell scripts need read & execute to work. After all, what happens
>>is that ksh (or bash or whatever) starts up (#!/bin/ksh) and then
>>attempts to read in the rest of the script as it's stdin.
>>No read permission, so it blows. Compiled executables don't
>>suffer from this, but all scripted languages do. 755 or 750 or 700
>>would be normal permissions for scripts.
>
>Don't you just hate that.
>The pure simple blindingly obvious taken for granted logical reason that
>just never makes it past the tip of the tongue.
>
>It's one of the things I like about *nix, if you sit down and look the
>answer is usually starring back at you.

That's what makes it such a love-hate relationship I suppose.

Thanks to all who responded. The permissions *were* wrong, however
(predictably) there were/are other problems too!

0 new messages