Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Access the proc filesystem on QNX 6.6 x86 by a non root user: (2 Items)
   
Access the proc filesystem on QNX 6.6 x86 by a non root user  
I have two Systems to test on.

1. A Pre compiled QNX 6.5 distribution with diskboot
2. A custom build image with QNX 6.6

On QNX 6.5 it is possible to run the following command as a non root user:
$ showmem -P
$ id
uid=1000(tester) gid=1000(tester)

Under QNX 6.6 the same command produces the following errors:
$ showmem -P
mem_offset64_peer() failed (Operation not permitted): pid=1, vaddr=0xf4400000
Unable to get phys addrs for pid: 1
This process will be ignored
mem_offset64_peer() failed (Operation not permitted): pid=2, vaddr=0x07fc7000
Unable to get phys addrs for pid: 2
This process will be ignored
...
$ id
uid=1000(tester) gid=1000(tester) groups=1000(tester),100(users)

I have changed the boot command so every user on the system has access to proc:
procnto-smp-instr -v -u 0002

$ ls -l /proc/
...
dr-xr-xr-x   2 root      root              1 Nov 24 17:44 3
dr-xr-xr-x   2 root      root              1 Nov 24 17:44 36883
dr-xr-xr-x   2 root      root              1 Nov 24 17:44 36887
...

If I try to list process number 3 it works
$ ls -l /proc/3
total 1882
-rw-rw-r--   1 root      root         962560 Nov 24 17:44 as
-rw-rw-r--   1 root      root              9 Nov 24 17:44 cmdline
-rw-rw-r--   1 root      root             20 Nov 24 17:44 exefile

But the user is unable to open this for example
$ ls -l /proc/36883
ls: Operation not permitted (/proc/36883)

Is the access restricted to the root user?

Thanks
Re: Access the proc filesystem on QNX 6.6 x86 by a non root user  
It is probably not the right forum to ask this, maybe try core os forums?
http://community.qnx.com/sf/discussion/do/listTopics/projects.core_os/discussion.newcode


On 14-11-25 05:15 AM, Stefan Holzmüller wrote:
> I have two Systems to test on.
>
> 1. A Pre compiled QNX 6.5 distribution with diskboot
> 2. A custom build image with QNX 6.6
>
> On QNX 6.5 it is possible to run the following command as a non root user:
> $ showmem -P
> $ id
> uid=1000(tester) gid=1000(tester)
>
> Under QNX 6.6 the same command produces the following errors:
> $ showmem -P
> mem_offset64_peer() failed (Operation not permitted): pid=1, vaddr=0xf4400000
> Unable to get phys addrs for pid: 1
> This process will be ignored
> mem_offset64_peer() failed (Operation not permitted): pid=2, vaddr=0x07fc7000
> Unable to get phys addrs for pid: 2
> This process will be ignored
> ...
> $ id
> uid=1000(tester) gid=1000(tester) groups=1000(tester),100(users)
>
> I have changed the boot command so every user on the system has access to proc:
> procnto-smp-instr -v -u 0002
>
> $ ls -l /proc/
> ...
> dr-xr-xr-x   2 root      root              1 Nov 24 17:44 3
> dr-xr-xr-x   2 root      root              1 Nov 24 17:44 36883
> dr-xr-xr-x   2 root      root              1 Nov 24 17:44 36887
> ...
>
> If I try to list process number 3 it works
> $ ls -l /proc/3
> total 1882
> -rw-rw-r--   1 root      root         962560 Nov 24 17:44 as
> -rw-rw-r--   1 root      root              9 Nov 24 17:44 cmdline
> -rw-rw-r--   1 root      root             20 Nov 24 17:44 exefile
>
> But the user is unable to open this for example
> $ ls -l /proc/36883
> ls: Operation not permitted (/proc/36883)
>
> Is the access restricted to the root user?
>
> Thanks
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post112424
> To cancel your subscription to this discussion, please e-mail general-ide-unsubscribe@community.qnx.com