change the default access right for nouser folders and files in Red Hat Enterprise Linux
Issue
We found there is folders and files in system which is by default without owner or writable to anyone.
We’d like to know why the below folders or files are set with such access rights by default?
Is it safe for we restrict the access to those file to harden the system? If can not, any reason can be explained?
World writable folders:
#find / -perm -0002 -type d -print
/var/log/dumps, /dev/shm
World writable files:
#find / -perm -0002 -type f -print
/selinux/member
/selinux/user
/selinux/relabel
/selinux/create
/selinux/access
/selinux/context
Files with no user or group:
#sudo find / -nouser -o -nogroup -print
/usr/bin/ssh-agent
/usr/sbin/postdrop
/usr/sbin/postqueue
/usr/libexec/utempter
/var/lock
/var/spool/postfix/public
/var/spool/postfix/maildrop
/var/spool/postfix/maildrop/25C1E13403A
/var/cache/man/X11R6
/var/cache/man/X11R6/cat7
/var/cache/man/X11R6/cat9
/var/cache/man/X11R6/catn
/var/cache/man/X11R6/cat4
/var/cache/man/X11R6/cat8
/var/cache/man/X11R6/cat5
/var/cache/man/X11R6/cat6
/var/cache/man/X11R6/cat2
/var/cache/man/X11R6/cat3
/var/cache/man/X11R6/cat1
/var/cache/man/cat7
/var/cache/man/cat9
/var/cache/man/catn
/var/cache/man/cat4
/var/cache/man/cat8
/var/cache/man/cat5
/var/cache/man/cat6
/var/cache/man/local
/var/cache/man/local/cat7
/var/cache/man/local/cat9
/var/cache/man/local/catn
/var/cache/man/local/cat4
/var/cache/man/local/cat8
/var/cache/man/local/cat5
/var/cache/man/local/cat6
/var/cache/man/local/cat2
/var/cache/man/local/cat3
/var/cache/man/local/cat1
/var/cache/man/cat2
/var/cache/man/cat3
/var/cache/man/cat1
/var/cache/cups
/var/cache/cups/job.cache
/var/cache/cups/rss
Environment
- Red Hat Enterprise Linux All Versions
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
