Permission denied when reading /proc/$PID/* owned by the user

Solution Verified - Updated -

Issue

  • When reading /proc/$PID/environ, Permission denied is received even though process is owned by the user trying to read, and file permissions indicate it can read the file

    $ ls -l /proc/3039/environ
    -r--------. 1 test root 0 May 21 14:02 /proc/3039/environ
    $ id
    uid=500(test) gid=501(test) groups=501(test),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
    $ cat /proc/3039/environ
    cat: /proc/3039/environ: Permission denied
    
  • numastat on owned process returns Permission denied

    $ numastat java
    Per-node process memory usage (in MBs) for PID 5559 (java)
    Can't read /proc/5559/numa_maps: Permission denied
    

Environment

  • Red Hat Enterprise Linux (RHEL)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.