Why .profile and .bash_profile have non-owner R permissions?
0
votes
2
answers
504
views
On the Linux systems I've seen the files
.profile
and .bash_profile
in ~
have permissions -rw-r--r--
.
People seem to put various env vars into these files quite often, including smth like AWS keys, etc.
Those non-owner R bits don't make these files widely readable, because home directories themselves prevent that by having drwx------
. Which makes sense.
HOWEVER.
Doesn't this increase the potential attack surface? What's the reason for having those R bits on by default across many Linux distributions? Any specific use-cases valid today?
Btw, .bash_history
has -rw-------
. So it looks more private than the files in subject. Not clear why.
Asked by Anton K
(351 rep)
Nov 28, 2023, 10:47 PM
Last activity: Nov 29, 2023, 04:57 AM
Last activity: Nov 29, 2023, 04:57 AM