On Sat, Jan 21, 2023 at 11:49:05PM -0000, old sixpack13 wrote:

ls -laZ
total 20
dr-xr-x---. 1 root root system_u:object_r:admin_home_t:s0       154 22. Jan 
00:17 .
dr-xr-xr-x. 1 root root system_u:object_r:root_t:s0             138 15. Dez 
00:48 ..
-rw-------. 1 root root unconfined_u:object_r:admin_home_t:s0  3180 22. Jan 
00:00 .bash_history
-rw-r--r--. 1 root root system_u:object_r:admin_home_t:s0        18 23. Jul 
2022  .bash_logout
-rw-r--r--. 1 root root system_u:object_r:admin_home_t:s0       141 23. Jul 
2022  .bash_profile
-rw-r--r--. 1 root root system_u:object_r:admin_home_t:s0       429 23. Jul 
2022  .bashrc
drwx------. 1 root root system_u:object_r:cache_home_t:s0         6 22. Jan 
00:08 .cache
drwx------. 1 root root unconfined_u:object_r:config_home_t:s0   30 21. Jan 
23:44 .config
drwx------. 1 root root unconfined_u:object_r:dbus_home_t:s0     22 17. Sep 
15:40 .dbus
-rw-------. 1 root root unconfined_u:object_r:admin_home_t:s0    20 22. Jan 
00:17 .lesshst
drwx------. 1 root root unconfined_u:object_r:gconf_home_t:s0    10 10. Sep 
20:15 .local

I'm completely unexperienced with selinux, but shouldn't I be able to delete 
.cache cause I own the dir and have write permission ?

Your idea is reasonable. To be able to modify a file you need "w" permission on that file. HOWEVER, removing a file is not considered
to be modifying THAT file.  It is modifying the directory which
contains the file.

Note that if there was another hard link to the file in a different
directory, the file is not modified  Contents remain, link count
drops.  But the containing directory is modified, it loses an entry.

You have write permission on .cache, but not on ".", the containing directory. So you can modify the contents of .cache, not "."


--
Jon H. LaBadie                  jo...@jgcomp.com
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to