Why can linux users see each others files?

-2

I would have thought that basic security principles would mean that users can't see files in the home directory of other users. Many many years ago I worked on Novell servers and I seem to recall they worked in that way. Anyone able to give some insight? thanks

Duke Dougal

Posted 2014-02-19T02:39:34.413

Reputation: 331

I don't know why this is the default permissions (and certainly it might be different from one system to the next), but if you want to change this, see this answer.

– user55325 – 2014-02-19T02:49:10.430

3This seems like a major over-generalization. It's possible (just as it is for Windows), but it hasn't been the default on any distro I have ever used. How are you creating users? You sure you aren't using sudo rights to check this...? You should do an ls -al to check the perms. – nerdwaller – 2014-02-19T02:56:15.453

Answers

0

This depends on the file permissions on the user home directory. You can prevent other users from seeing your files by changing the folder or file permissions.

For example you can run this command to change permissions on your files

> chmod 700 filename

or this if you want your entire home directory.

> pwd
/home/username
> cd ../
> pwd
/home
> chmod 700 username

Your username is usually the same name as your home directory.

After you do this, only you and the root user will be able to view your files.

I hope this helps.

Cyberninja

Posted 2014-02-19T02:39:34.413

Reputation: 311