Problem running programs logged as regular user

Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD (June 2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch SHELL=/bin/sh.
Please indicate me where is the wrong setting?
Thanks.

Vasi Guta

“Vasi Guta” <vguta@cc.nuclear.ro> wrote in message
news:3CB3F9F6.CCB964AA@cc.nuclear.ro

Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD (June
2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch SHELL=/bin/sh.
Please indicate me where is the wrong setting?
Thanks.

What’s the name of your program, What doesn’t your program do.
Have you tried ./ (add ./ in front)

Vasi Guta

My program is even ‘Hello world!’. The shell does not start the program at all.
I have tried . /progname but I got an error message.
If I log as root the program works fine. I think it’s a permission problem but I can’t
realize where/what is.


Mario Charest wrote:

“Vasi Guta” <> vguta@cc.nuclear.ro> > wrote in message
news:> 3CB3F9F6.CCB964AA@cc.nuclear.ro> …
Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD (June
2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch SHELL=/bin/sh.
Please indicate me where is the wrong setting?
Thanks.


What’s the name of your program, What doesn’t your program do.
Have you tried ./ (add ./ in front)

Vasi Guta

“Vasi Guta” <vguta@cc.nuclear.ro> wrote in message
news:3CB42CC8.EB245B5A@cc.nuclear.ro

My program is even ‘Hello world!’. The shell does not start the program at
all.
I have tried . /progname but I got an error message.

What error message, same as before?

If I log as root the program works fine. I think it’s a permission problem
but I can’t
realize where/what is.

can you copy the file in /tmp directory for example (to test if you can read
the file),
if you can’t read it may the direcotry you are in doesn’t have the proper
permissions.

Mario Charest wrote:

“Vasi Guta” <> vguta@cc.nuclear.ro> > wrote in message
news:> 3CB3F9F6.CCB964AA@cc.nuclear.ro> …
Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD
(June
2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not
permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch
SHELL=/bin/sh.
Please indicate me where is the wrong setting?
Thanks.


What’s the name of your program, What doesn’t your program do.
Have you tried ./ (add ./ in front)

Vasi Guta

Vasi Guta <vguta@cc.nuclear.ro> wrote:

Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD (June 2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch SHELL=/bin/sh.
Please indicate me where is the wrong setting?

What compile flags did you use when compiling it? Did you use/copy
in a makefile? In particular, did you include a -T1 flag?

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Is it possible that the program was compiled by ‘root’ and only root has
execute permissions. Do a ‘ls -l progname’. Who owns the program? If it
is not what you are logged in as now do you have execute permissions?

You may want to try ‘chmod a+rx progname’. This gives everyone execute
rights of the program. (You may have to me root to do the chmod command.)

“Vasi Guta” <vguta@cc.nuclear.ro> wrote in message
news:3CB42CC8.EB245B5A@cc.nuclear.ro

My program is even ‘Hello world!’. The shell does not start the program at
all.
I have tried . /progname but I got an error message.
If I log as root the program works fine. I think it’s a permission problem
but I can’t
realize where/what is.


Mario Charest wrote:

“Vasi Guta” <> vguta@cc.nuclear.ro> > wrote in message
news:> 3CB3F9F6.CCB964AA@cc.nuclear.ro> …
Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD
(June
2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not
permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch
SHELL=/bin/sh.
Please indicate me where is the wrong setting?
Thanks.


What’s the name of your program, What doesn’t your program do.
Have you tried ./ (add ./ in front)

Vasi Guta

David Gibbs wrote:

Vasi Guta <> vguta@cc.nuclear.ro> > wrote:
Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD (June 2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch SHELL=/bin/sh.
Please indicate me where is the wrong setting?

What compile flags did you use when compiling it? Did you use/copy
in a makefile? In particular, did you include a -T1 flag?

-David

Yes, I did use -T1.
This is the content of my Makefile:

sou = progname
$(sou): $(sou).o
cc -o $(sou) $(sou).o -T1
$(sou).o: $(sou).c
cc -c $(sou).c

The directory I am in is /home/user.
BUT, if I follow the same steps on a computer running QNX 4.25 updated from QNX 4.24,
there is no problem, I can run the program I compiled with tis Makefile.

“Vasi Guta” <vguta@cc.nuclear.ro> wrote in message
news:3CB53133.8765B289@cc.nuclear.ro

David Gibbs wrote:

Vasi Guta <> vguta@cc.nuclear.ro> > wrote:
Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD
(June 2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not
permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch
SHELL=/bin/sh.
Please indicate me where is the wrong setting?

What compile flags did you use when compiling it? Did you use/copy
in a makefile? In particular, did you include a -T1 flag?

-David

Yes, I did use -T1.
This is the content of my Makefile:

That’s it, with -T1 the program has privity 1 which mean it can only
be run as root. Unless the program uses IO instruction, map
physical memory or install interrupt handler, the T1 flag
isn’t required

sou = progname
$(sou): $(sou).o
cc -o $(sou) $(sou).o -T1
$(sou).o: $(sou).c
cc -c $(sou).c

The directory I am in is /home/user.
BUT, if I follow the same steps on a computer running QNX 4.25 updated
from QNX 4.24,
there is no problem, I can run the program I compiled with tis Makefile.

That was a bug with 4.24 :wink:

Vasi Guta <vguta@cc.nuclear.ro> wrote:

David Gibbs wrote:

Vasi Guta <> vguta@cc.nuclear.ro> > wrote:
Problem running programs logged as regular user

I am using QNX 4.25 installed directly from QNX4 Product Upgrade CD (June 2000CD).
I log as regular user, create a simple C source code file, compile it;
when I try run the program I receive de message: Operation not permitted.
The permissions for the program are rwxrwxr-x.
There is no personal profile, the default profile launch SHELL=/bin/sh.
Please indicate me where is the wrong setting?

What compile flags did you use when compiling it? Did you use/copy
in a makefile? In particular, did you include a -T1 flag?

-David

Yes, I did use -T1.

-T1 programs can only be run by super user.

This is the content of my Makefile:

sou = progname
$(sou): $(sou).o
cc -o $(sou) $(sou).o -T1
$(sou).o: $(sou).c
cc -c $(sou).c

The directory I am in is /home/user.
BUT, if I follow the same steps on a computer running QNX 4.25
updated from QNX 4.24, there is no problem, I can run the program
I compiled with tis Makefile.

There was a bug in some earlier versions of QNX where it didn’t enforce
root before giving I/O access (which is what -T1 requests).

If you updated a 4.24 to 4.25, but still see this behaviour, you
have completed your update. I would expect that if you did a
“sin ver” it would still report you Proc as some flavour of 4.24.

You need to build a new boot image, and replace your current boot
image with the updated one. This should be covered in the
Installation & Configuration manual.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“Mario Charest” <goto@nothingness.com> wrote in message
news:a93qk6$cg6$1@inn.qnx.com

That’s it, with -T1 the program has privity 1 which mean it can only
be run as root. Unless the program uses IO instruction, map
physical memory or install interrupt handler, the T1 flag
isn’t required

The other option is to:

  1. Have the program owned by root:
  2. Have the program set UID root:
  3. Have the program executable by all:

chown root myprog
chmod u+s myprog
chmod a+x myprog