1

I'd like to add the write access on /sys/power/state to my UID via ACLs, this way I'd don't need to use sudo or any setuid program to make my workstation go on sleepmode, is that possible ? I tried, following the man, and add this error :

➜  ~  sudo setfacl -m u:nelson:w /sys/power/state
setfacl: /sys/power/state: Invalid argument

It looks like what happened is not exactly what I meant,

Could someone enlighten me a little ? I don't understand why the setfacl command acted like it was writing something to the FIFO

1 Answer 1

2

Setting an ACL on anything in /sys might not be possible. The sysfs filesystem was originally based on ramfs, which doesn't have support for extended ACL's.

I did an strace of the setfacl command, and just before the setxattr call which returns EINVAL, there is a getxattr call which gives the error that the operation is not supported:

getxattr("/sys/power/state", "system.posix_acl_access", 0x7fff4ab593c0, 132) = -1 EOPNOTSUPP (Operation not supported)
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .