[SOLVED] i3status doesn't work because of sysfs restrictions

4 posts / 0 new
Last post
#1 Sat, 2016-09-03 08:18
imv
  • imv's picture
  • Offline
  • Last seen: 8 months 6 days ago
  • Joined: 2016-09-03

Some modules in i3status config (battery, cpu_temperature) want to access files in /sys/. However, due to GRKERNSEC_SYSFS_RESTRICT they can't do that.
Is there a way to make i3status work without ditching linux-grsec for linux-vanilla, or setting SUID bit for i3status, or recompiling the kernel?

Wed, 2016-09-28 11:08
Youbi
  • Youbi's picture
  • Offline
  • Last seen: 1 year 2 months ago
  • Joined: 2016-09-28

Hello imv :)

I think that I chowned all /sys tree to root:wheel, and added my user to the wheel group, so that I can read the values (and only read them) provided by the sysfs.

Tue, 2017-03-28 14:55
shulhan
  • shulhan's picture
  • Offline
  • Last seen: 8 months 2 weeks ago
  • Joined: 2017-03-23

This is my current solution,

1. Create file `/etc/local.d/99-sysfs-mode.start`
2. Add the following lines into it,

#!/bin/sh
 
chown -R :wheel /sys
chmod -R g+rX /sys

3. Make the file to be executable

# chmod +x /etc/local.d/99-sysfs-mode.sh

4. Enable local service to run at boot,

# rc-update add local

5. Run local service

# openrc

Sat, 2017-04-08 17:23
imv
  • imv's picture
  • Offline
  • Last seen: 8 months 6 days ago
  • Joined: 2016-09-03

Thanks shulhan, that worked.

Log in or register to post comments