From my previous question I got a solution that worked that time: sudo chattr +i /run/docker.sock. But right now it doesn't work. I get chattr: operation not supported while reading flags on /run/docker.sock. Why chattr doesn't work on docker.sock anymore? How can I fix it?
Asked
Active
Viewed 433 times
4
sanyassh
- 157
- 1
- 2
- 11
-
Did you try this? https://superuser.com/questions/755285/why-is-chattr-and-lsattr-resulting-in-operation-not-supported-while-reading-fla – Severus Tux Apr 19 '20 at 15:48
-
1@SeverusTux I saw that question. If I understand correctly, /run/docker.sock is not a symlink. /var/run/docker.sock is. – sanyassh Apr 19 '20 at 15:51
-
You cant do that on socket files too. https://stackoverflow.com/a/5978150/5898324 – Severus Tux Apr 19 '20 at 16:18
-
@SeverusTux but I actually can change permissions, which doesn't correlate with that answer. `sudo chmod 777 /run/docker.sock` works just fine. – sanyassh Apr 19 '20 at 16:31
-
Yes. `chmod` works but `chattr` doesn't. This is true for any socket file. Try it yourself by creating a socket file `nc -lU test.sock` (or `ncat`) – Severus Tux Apr 19 '20 at 16:34
-
@SeverusTux it is very strange because 4 months ago it worked: https://askubuntu.com/questions/1194205/why-var-run-docker-sock-permissions-are-changed-every-time-i-log-out-how-can-i?noredirect=1&lq=1 I am sure that I used `chattr +i /run/docker.sock` as suggested in the answer and comments and it worked... – sanyassh Apr 19 '20 at 17:23
-
@sanyash is it possible that an older package version had this placed on standard storage and now it's in RAM? I.e. different FS type? – 0xC0000022L Apr 20 '20 at 22:04