When reviewing my daily logwatch report, I noticed a new df error this morning. I noticed the unusual error at the top of the df listing.
$ df (when run manually from my own account)
df: /run/user/1000/doc: Operation not permitted
or
(when run via root in the daily logwatch report)
df: /root/.cache/doc: Operation not permitted
Thedoc directory appears in the root /root/.cache/ folder (which I've since deleted), and in my own user account /run/user/1000/ folder (or in any /run/user/* directory after log in).
How can I find out why df has this error?
Update #1:
Note that when I do ls -al /run/user/1000 I get the following, and the point to note is that the doc directory has an odd date. Where might this directory come from?
drwx------ 13 xxxxxxxxxxx xxxxxxxxxxx 380 Apr 16 10:07 .
drwxr-xr-x 4 root root 80 Apr 16 09:56 ..
srw-rw-rw- 1 xxxxxxxxxxx xxxxxxxxxxx 0 Apr 16 09:56 bus
drwx------ 3 xxxxxxxxxxx xxxxxxxxxxx 60 Apr 16 09:56 dbus-1
drwx------ 2 xxxxxxxxxxx xxxxxxxxxxx 60 Apr 16 10:14 dconf
dr-x------ 2 xxxxxxxxxxx xxxxxxxxxxx 0 Dec 31 1969 doc
drwx--x--x 2 xxxxxxxxxxx xxxxxxxxxxx 60 Apr 16 09:56 gdm
prw-rw-r-- 1 xxxxxxxxxxx xxxxxxxxxxx 0 Apr 16 09:56 gnome-session-leader-fifo
drwx------ 3 xxxxxxxxxxx xxxxxxxxxxx 60 Apr 16 09:56 gnome-shell
drwx------ 2 xxxxxxxxxxx xxxxxxxxxxx 140 Apr 16 09:56 gnupg
dr-x------ 2 xxxxxxxxxxx xxxxxxxxxxx 0 Apr 16 10:06 gvfs
drwx------ 2 xxxxxxxxxxx xxxxxxxxxxx 40 Apr 16 09:56 gvfs-burn
-rw------- 1 xxxxxxxxxxx xxxxxxxxxxx 1046 Apr 16 10:06 ICEauthority
drwx------ 2 xxxxxxxxxxx xxxxxxxxxxx 100 Apr 16 10:06 keyring
srw-rw-rw- 1 xxxxxxxxxxx xxxxxxxxxxx 0 Apr 16 09:56 pk-debconf-socket
drwx------ 2 xxxxxxxxxxx xxxxxxxxxxx 80 Apr 16 09:59 pulse
srw-rw-rw- 1 xxxxxxxxxxx xxxxxxxxxxx 0 Apr 16 09:56 snapd-session-agent.socket
drwxr-xr-x 3 xxxxxxxxxxx xxxxxxxxxxx 100 Apr 16 09:56 systemd
-rw------- 1 xxxxxxxxxxx xxxxxxxxxxx 0 Apr 16 09:57 update-notifier.pid
Update #2:
Interesting enough, I have a second laptop which is exactly like my primary laptop, and the /run/user/1000/doc/ directory is there also, with the same weird date, but df works fine there without error.
On my primary laptop, if I run sudo df there are no errors.
Both laptops are running 19.10, with the same -46 kernel, and the same version 8.30 of df.
Update #3:
Problem still exists in 20.04.
Update #4:
Problem still exists in 20.10.
lsattr -R /root/.cache/doc(run as root-user) give? – mook765 Apr 16 '20 at 15:17/run/user/1000since it's mounted astmpfs. Another useful link. – mook765 Apr 16 '20 at 17:42lsofdoesn't show that any active process has it open. The/run/user/1000/doc/and its sub-dir seem to get created at user login. My second machine does the same thing, with the same "Dec 31 1969" date, anddfworks fine there. On the primary machine, asudo dfworks fine. Leads me to believe that there's a permissions problem somewhere. – heynnema Apr 17 '20 at 16:05dfc, a colorized version ofdf, and it throws the same error. – heynnema Apr 17 '20 at 16:13/run/user/1000are dictated by systemd, that's why you can't deletedoc, even as root-user. The question is which process creates the directory during login. – mook765 Apr 18 '20 at 09:28dferror on my primary system, but not my backup system? Riddles. – heynnema Apr 18 '20 at 15:46