Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Linux::Smaps on RHEL

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


swartz at pobox

Jul 21, 2009, 3:53 PM

Post #1 of 3 (984 views)
Permalink
Linux::Smaps on RHEL

I'm running into the problem using Linux::Smaps on RHEL with an Apache
server on port 80. Namely, that the httpd child doesn't have
permissions to look at the smaps file.

Linux::Smaps: Cannot open /proc/20074/smaps: Permission denied
or
Linux::Smaps: Cannot open /proc/self/smaps: Permission denied

I believe it is this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=322881

Since the redhat folks don't seem to be in a hurry to fix this, I'm
wondering if anyone has discovered a workaround. (Other than, "don't
use RHEL" - beyond my control. :))

Thanks
Jon


torsten.foertsch at gmx

Jul 22, 2009, 6:24 AM

Post #2 of 3 (924 views)
Permalink
Re: Linux::Smaps on RHEL [In reply to]

On Wed 22 Jul 2009, Jonathan Swartz wrote:
> I'm running into the problem using Linux::Smaps on RHEL with an
> Apache   server on port 80. Namely, that the httpd child doesn't have
> permissions to look at the smaps file.
>
>       Linux::Smaps: Cannot open /proc/20074/smaps: Permission denied
>    or
>       Linux::Smaps: Cannot open /proc/self/smaps: Permission denied
>
> I believe it is this bug:
>
>      https://bugzilla.redhat.com/show_bug.cgi?id=322881
>
> Since the redhat folks don't seem to be in a hurry to fix this, I'm  
> wondering if anyone has discovered a workaround. (Other than, "don't
>   use RHEL" - beyond my control. :))

If access is denied by the kernel there is only one solution, fix the
kernel.

Torsten

--
Need professional mod_perl support?
Just hire me: torsten.foertsch [at] gmx


hans at welinux

Jul 22, 2009, 6:27 AM

Post #3 of 3 (915 views)
Permalink
Re: Linux::Smaps on RHEL [In reply to]

Jonathan,

I've tested on Redhat Nahant (RHEL4, i don't like it but my situation is similar to yours), an effectively the permissions are very tight, 600 for the smaps file. Let's look at the smaps of the current process (bash in this case):

[hans [at] le ~]$ ls -l /proc/$$/smaps

-r-------- 1 hans hans 0 jul 22 08:47 /proc/25064/smaps

In any case root and the user owner of the process can read the file, you must run the process that is reading the smaps file as root or as the user owner of the process. If you can't do it in normal ways, you can achieve this using the setuid bit to force the auditing process to run under the user owning the maps.

Good luck
Hans

----- "Jonathan Swartz" <swartz [at] pobox> escribió:

> I'm running into the problem using Linux::Smaps on RHEL with an Apachee
>
> server on port 80. Namely, that the httpd child doesn't have
> permissions to look at the smaps file.
>
> Linux::Smaps: Cannot open /proc/20074/smaps: Permission denied
> or
> Linux::Smaps: Cannot open /proc/self/smaps: Permission denied
>
> I believe it is this bug:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=322881
>
> Since the redhat folks don't seem to be in a hurry to fix this, I'm
> wondering if anyone has discovered a workaround. (Other than, "don't
>
> use RHEL" - beyond my control. :))
>
> Thanks
> Jon

--
Hans Poo, WeLinux S.A.
Oficina: 697.25.42, Celular: 09-319.93.05
Bombero Ossa # 1010, Santiago

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.