Why is the default umask 002 or 022 in many Unix systems? Seems insecure by default
9
votes
1
answer
9153
views
I have been using Linux & Unix for a long time. The first time I learned Unix is in a computer classroom with many students, where the instructor told us that you can use
ssh
to log in to remote workstations provided by the university I was studying in.
In that context, I immediately know that Unix is a multi-user operating system because there were more students than workstations. (Pigeonhole principle.)
Somehow after many years of use, I know basically what the umask
(default to 022 for write permission to the user, 002 for write permission to groups of users such as teams) is and that the default permission of a user (and a new user) is 755
for folders, 644
for files.
But after thinking a little deeper about it, it seems that the default permission setting is insecure in such a multi-user operating system.
Although it makes sharing data easier, I still feel strange when you can easily list & copy other users' files within their home directory.
So is why the default umask 002 or 022 in many Unix systems? Is there any historical reason that *traditional* Unix chose this design?
(One possible reason I can think of is that, during 1970 ~ 1980 computers are used mostly in scientific research and the computing power is very limited. So when the early version of Unix comes out, they decided that the default permission should be for easy sharing instead of privacy protection.)
Asked by Bossliaw
(199 rep)
Oct 8, 2016, 11:58 AM
Last activity: Jul 8, 2023, 12:23 AM
Last activity: Jul 8, 2023, 12:23 AM