Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

Permission denied: '/tmp/tmpkjqha77c/rendered_template-63.py.out' #21

@Sovetnikov

Description

@Sovetnikov

Running memory_analyzer under root for process that is run under regular user and got this output from memory_analyzer
Additionally sentry reporter generated event with "Permission denied: '/tmp/tmpkjqha77c/rendered_template-63.py.out'"
Seems temporary file with python code has root only permissions.

memory_analyzer run 63 -debug

Analyzing pid 63
Setting up GDB for pid 63
bug: No such file or directory.
[New LWP 384]
[New LWP 498]
[New LWP 499]
[New LWP 500]
[New LWP 501]
[New LWP 502]
[New LWP 503]
[New LWP 504]
[New LWP 768]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f9d8dec8037 in __GI___select (nfds=nfds@entry=0, readfds=readfds@entry=0x0, writefds=writefds@entry=0x0, exceptfds=exceptfds@entry=0x0, timeout=timeout@entry=0x7fff82826910) at ../sysdeps/unix/sysv/linux/select.c:41
41 ../sysdeps/unix/sysv/linux/select.c: No such file or directory.
+set directories /usr/local/lib/python3.7/site-packages/memory_analyzer/
+py sys.path.append("/usr/local/lib/python3.7/site-packages/memory_analyzer/")
++file_command /tmp/tmpkjqha77c/rendered_template-63.py.out
GIL $1
+++call (void) PyRun_SimpleString("with open('/tmp/tmpkjqha77c/rendered_template-63.py.out') as f: exec(f.read())")
+++call (void) PyGILState_Release($1)
[Inferior 1 (process 63) detached]
Gathering data...
ERROR: Analysis for 63 returned no data! Try rerunning with --debug
ERROR: No results to report

su user

$ cat /tmp/tmpkjqha77c/rendered_template-63.py.out
cat: /tmp/tmpkjqha77c/rendered_template-63.py.out: Permission denied
$ ls -alF /tmp
total 32
drwxrwxrwt 1 root root 4096 Dec 5 09:04 ./
drwxr-xr-x 1 root root 4096 Dec 5 09:01 ../
drwx------ 2 root root 4096 Dec 5 09:04 tmpkjqha77c/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions