pyJoules icon indicating copy to clipboard operation
pyJoules copied to clipboard

PermissionError: [Errno 13] Permission denied

Open danglotb opened this issue 3 years ago • 6 comments

Hello,

When I run pyJoules, I have the following error:

PermissionError: [Errno 13] Permission denied: '/sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:2/energy_uj'

I do not understand what I did to have less permission on these files.

Here, is the output of ls -l:

ls -l /sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:2 
total 0
-r-------- 1 root root 4096 Nov 15 15:19 constraint_0_max_power_uw
-r-------- 1 root root 4096 Nov 15 15:19 constraint_0_name
-rw------- 1 root root 4096 Nov 15 15:19 constraint_0_power_limit_uw
-rw------- 1 root root 4096 Nov 15 15:19 constraint_0_time_window_us
lrwxrwxrwx 1 root root    0 Nov 15 15:19 device -> ../../intel-rapl:0
-rw-r--r-- 1 root root 4096 Nov 15 15:19 enabled
-r-------- 1 root root 4096 Nov 15 11:10 energy_uj
-r-------- 1 root root 4096 Nov 15 15:19 max_energy_range_uj
-r--r--r-- 1 root root 4096 Nov 15 15:14 name
drwxr-xr-x 2 root root    0 Nov 15 15:19 power
lrwxrwxrwx 1 root root    0 Nov 15 15:19 subsystem -> ../../../../../../class/powercap
-rw-r--r-- 1 root root 4096 Nov 15 15:19 uevent

Looks quite normal that the permission is denied, because of -r-------- 1 root root 4096 Nov 15 11:10 energy_uj. I do not want to set up the proper permissions manually(e.g. with chmod command), do you have any idea if there are any settings or something I can do to have the proper permissions ?

Thank you.

danglotb avatar Nov 15 '20 14:11 danglotb