Inotify_add_watch(/var/cache/cups) failed: (Permission denied)

I use manjaro kde plasma unstable. I am experiencing a strange error when I try to browse /var/log or /var/cache folder. The permission error appears in the log as soon as I browse any of these location. I do not try to open any files but permission issue pops up in system log.

    ~  journalctl -p 3 -b                                                                                                                   ✔ 
Aug 28 08:46:49 ajayc-X430UA kernel: x86/cpu: SGX disabled by BIOS.
Aug 28 08:46:49 ajayc-X430UA kernel: blacklist: Problem blacklisting hash (-13)
Aug 28 08:46:49 ajayc-X430UA kernel: blacklist: Problem blacklisting hash (-13)
Aug 28 08:46:49 ajayc-X430UA kernel: blacklist: Problem blacklisting hash (-13)
Aug 28 08:46:49 ajayc-X430UA kernel: blacklist: Problem blacklisting hash (-13)
Aug 28 08:46:51 ajayc-X430UA kernel: i2c_hid_acpi i2c-ELAN1300:00: device returned incorrect report (2 vs 14 expected)
Aug 28 08:46:53 ajayc-X430UA systemd[605]: Failed to start Update XDG user dir configuration.
Aug 28 08:47:01 ajayc-X430UA kded5[750]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
Aug 28 08:47:01 ajayc-X430UA kded5[750]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
Aug 28 08:47:24 ajayc-X430UA dolphin[1160]: inotify_add_watch(/var/cache/cups) failed: (Permission denied)
Aug 28 08:47:24 ajayc-X430UA dolphin[1160]: inotify_add_watch(/var/cache/ldconfig) failed: (Permission denied)
Aug 28 08:47:24 ajayc-X430UA dolphin[1160]: inotify_add_watch(/var/cache/private) failed: (Permission denied)
Aug 28 08:47:29 ajayc-X430UA dolphin[1160]: inotify_add_watch(/var/log/audit) failed: (Permission denied)
Aug 28 08:47:29 ajayc-X430UA dolphin[1160]: inotify_add_watch(/var/log/private) failed: (Permission denied)
Operating System: Manjaro Linux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.4-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: VivoBook S14 X430UA
System Version: 1.0

The issue is not causing any operational hindrance so not a critical one. Just seeking advice as to why this permission issue error only happens when browsing /var/cache or /var/log folder. I have not touched any default permission on the system.

I even tried to follow the solution posted in another post on this forum but it does not help since the default value on my system is anyway 208400.

echo fs.inotify.max_user_watches=204800 | sudo tee /etc/sysctl.d/40-max-user-watches.conf              

Not strange - but normal and intended.
Manjaro is a Unix like multi user system - different users have different rights to do certain things.

/var/cache/cups for instance contains (on a multi user system) files with possibly sensitive information in them
that one user is not supposed to even know about another user
or information about the current condition of the machine

similar for files in /var/log
who is logged in, what is installed, what services are currently running and by whom …

As you are also the admin of your computer, you can of course access all of this information
but just not when you are trying to do that as a regular user - then you’ll be denied access
and rightly so.

ls -al /var/log
and
ls -al /var/cache

will easily tell you the ownership of the files and directories in there
If you are not part of the group - you don’t get to see it …

Cups, for example:
you, as a regular user, may be allowed to use the service (to print)
but you are not allowed to see who else is using it or what they did …

Thanks @Nachlese.

I do see a difference in permissions (view) for folders in /Var/cache and /var/log for which permission error is generated.

drwxrwx--- 1 root cups  204 Aug 28 08:46 cups
drwxr-xr-x 1 root root 1284 Aug 27 09:23 fontconfig
drwx------ 1 root root   18 Aug 27 12:53 ldconfig
drwxr-xr-x 1 root root   20 Aug 23 08:15 localepurge
drwxr-xr-x 1 root root  122 Aug 28 07:51 man
drwxr-xr-x 1 root root    6 Jun 17 13:41 pacman
drwxr-xr-x 1 root root    0 Jul 14 10:02 pkgfile
drwx------ 1 root root    0 Jun 17 13:43 private
drwxr-xr-x 1 root root   34 Jul  1 14:55 samba
drwxr-xr-x 1 root root   10 Jun 17 13:49 swcatalog

drwx------  1 root root                  0 Apr 21 16:04 audit
-rw-rw----  1 root utmp                384 Aug 11 10:59 btmp
-rw-rw----  1 root utmp               2688 Aug  4 09:29 btmp.1
drwxr-xr-x  1 root root                208 Aug 28 07:51 cups
drwxr-xr-x  1 root root                  0 Jun  7 00:45 gssproxy
drwxr-sr-x+ 1 root systemd-journal      76 Jun 24 07:55 journal
-rw-rw-r--  1 root utmp                  0 Jun 24 07:55 lastlog
drwxr-xr-x  1 root root                  0 Jun  9 13:23 old
-rw-r--r--  1 root root             798973 Aug 28 07:57 pacman.log
drwx------  1 root root                  0 Jun 17 13:43 private

Once again thanks a lot

That will not happen if you temporarily switch the Dolphin view mode to Icons (Ctrl+1).

@flux Thanks
This seems to work.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.