What should be SELinux context for ~/.cache/thumbnails be?

I installed a fresh Fedora system with all files and directors in my user home directory from previous Fedora installation (I use a separated partition for my home directory).

And I keep getting SELinux error about unlick from thumbnail service for different files. I searched for the file, and it’s located in ~/.cache/thumbnails directory

This is my SEInux context:

$ ls -dZ /home/kuba/.cache/thumbnails
unconfined_u:object_r:user_home_dir_t:s0 /home/kuba/.cache/thumbnails
$ ls -dZ /home/kuba/.cache
unconfined_u:object_r:user_home_dir_t:s0 /home/kuba/.cache

I did try to use restorecon -R -v ~ but it makes no difference, it don’t add context added by thumbnail services for those files.

What context those directories should have?

It looks like it should be unconfined_u:object_r:thumb_home_t:s0.

$ grep thumbnails /etc/selinux/targeted/contexts/files/file_contexts.homedirs
/home/[^/]+/\.thumbnails(/.*)?	unconfined_u:object_r:thumb_home_t:s0
/home/[^/]+/\.cache/thumbnails(/.*)?	unconfined_u:object_r:thumb_home_t:s0
1 Like

Added selinux

$ ls -dZ .cache/thumbnails/
unconfined_u:object_r:thumb_home_t:s0 .cache/thumbnails/

$ ls -dZ .cache/thumbnails/*
unconfined_u:object_r:thumb_home_t:s0 .cache/thumbnails/fail    unconfined_u:object_r:thumb_home_t:s0 .cache/thumbnails/x-large
unconfined_u:object_r:thumb_home_t:s0 .cache/thumbnails/large   unconfined_u:object_r:thumb_home_t:s0 .cache/thumbnails/xx-large
unconfined_u:object_r:thumb_home_t:s0 .cache/thumbnails/normal