I was trying to increase my mouse scroll speed by following https://github.com/tkkcc/libinput_patch which requires modifying a file. Should be easy...
$ echo 6 > /tmp/libinput_discrete_deltay_multiplier
bash: /tmp/libinput_discrete_deltay_multiplier: Permission denied
Nothing a sudo wont solve right?
$ sudo bash -c 'echo "6" > /tmp/libinput_discrete_deltay_multiplier'
bash: line 1: /tmp/libinput_discrete_deltay_multiplier: Permission denied
Checks permisions
$ stat /tmp/libinput_discrete_deltay_multiplier
Access: (0666/-rw-rw-rw-)
At this moment I'm at the limit of my abilities. How can I change this file and why it doesn't let me change it even with root privileges? I tried many approaches and search engines are no good on this one.
Edit: Tried
$ echo 6 | sudo tee /tmp/libinput_discrete_deltay_multiplier
tee: /tmp/libinput_discrete_deltay_multiplier: Permission denied
$ dmesg | tail
dmesg: read kernel buffer failed: Operation not permitted
tee
? The answers in the link posted by @AndyDalton work for me, even after changing the permissions to 0600 and owned by root. – ajgringo619 Jul 07 '21 at 22:05dmesg | tail
– berndbausch Jul 07 '21 at 22:54sudo
is to have the sudo'ed Bash do the redirection, essentially the as in this answer in that same question. – ilkkachu Jul 07 '21 at 23:06lsattr /tmp/libinput_discrete_deltay_multiplier
. Alsomount
orfindmnt
to check what file system/tmp
is (or/
if/tmp
is part of it) – ilkkachu Jul 07 '21 at 23:08sudo dmesg
might help – ilkkachu Jul 07 '21 at 23:08lsattr /tmp/libinput_discrete_deltay_multiplier
lsattr: Operation not supported While reading flags on /tmp/libinput_discrete_deltay_multiplier – welkam Jul 07 '21 at 23:11ls -l /tmp/libinput_discrete_deltay_multiplier
(to see the file's owner and group) to it? Also, what operating system are you using? – fra-san Jul 08 '21 at 05:42ls -l /tmp
would be useful too, to make sure it is a sticky directory everyone can write to. A way to write to that file should then be to impersonate the file owner:sudo -u file_owner sh -c 'echo 6 > /tmp/...'
– fra-san Jul 08 '21 at 05:57ls -ld /tmp
, @fra-san – Chris Davies Jul 08 '21 at 07:16