You are not logged in.

#1 2020-12-09 19:34:59

palmerito0
Member
Registered: 2018-02-11
Posts: 3

Unable to write to directory despite being root and root being owner

Hey y'all, was trying to configure my backlight by adding a symlink to the /sys/class/backlight directory but seem unable to do so. Here's the error message, which occurs even when I am logged in as root:

 [root@willowlaptop backlight]# ln -s /sys/devices/pci0000:00/0000:00:08.1/0000:04:00.0/backlight/amdgpu_bl0/brightness /sys/class/backlight/backlight
ln: failed to create symbolic link '/sys/class/backlight/backlight': Operation not permitted 

I can't seem to touch or otherwise write files to the /sys/class/backlight directory:

 [root@willowlaptop backlight]# touch test
touch: cannot touch 'test': Permission denied 

Checked the permissions on the directory and it seems like I should already have read/write/execute permissions...

 [root@willowlaptop backlight]# ls -alF
total 0
drwxr-xr-x  2 root root 0 Dec  9 12:52 ./
drwxr-xr-x 71 root root 0 Dec  9 12:52 ../
lrwxrwxrwx  1 root root 0 Dec  9 12:52 amdgpu_bl0 -> ../../devices/pci0000:00/0000:00:08.1/0000:04:00.0/backlight/amdgpu_bl0/ 

And it's not an issue with the file I'm trying to symlink too, as I can create a symlink to it in another directory. Any idea what's going on?

Offline

#2 2020-12-09 19:46:29

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Unable to write to directory despite being root and root being owner

/sys is a sysfs virtual filesystem, I don't know why you think you should be capable of creating arbitrary files there.

No, root is not everything. If the filesystem doesn't permit you to create files, then the filesystem driver will... not permit you to create files.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2020-12-09 20:02:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,678

Re: Unable to write to directory despite being root and root being owner

configure my backlight by adding a symlink to the /sys/class/backlight directory

Why?
https://wiki.archlinux.org/index.php/Ba … gpu_driver ?

Offline

#4 2020-12-09 20:04:46

palmerito0
Member
Registered: 2018-02-11
Posts: 3

Re: Unable to write to directory despite being root and root being owner

Was merely following directions I found here: https://askubuntu.com/questions/715306/ … ght-folder

What should I do in this case then? Is there a way to force my way through, or should I investigate other possible solutions?

Offline

#5 2020-12-09 20:08:23

palmerito0
Member
Registered: 2018-02-11
Posts: 3

Re: Unable to write to directory despite being root and root being owner

seth wrote:

configure my backlight by adding a symlink to the /sys/class/backlight directory

Why?
https://wiki.archlinux.org/index.php/Ba … gpu_driver ?

acpilight works like a charm (albeit requiring root permissions, currently trying to work around that)

many thanks!

Offline

#6 2020-12-09 20:15:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,678

Re: Unable to write to directory despite being root and root being owner

https://gitlab.com/wavexx/acpilight

Edit: read above because of permissions.

Last edited by seth (2020-12-09 20:15:15)

Offline

Board footer

Powered by FluxBB