Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is normal. You are permitted to view other users information (most, not all) and copy from it. You are however not able to modify it.
If you want to stop that, you can go to /home and prevent other users from accessing the directory. Since they can never go into that one directory, everything else continues to be secure.
e.g., assuming my username is miati
Code:
chmod 700 /home/miati
Done.
The 7 indicates the owner may access, and write to the directory. The following two zeros indicate that the group and everyone else may not access or write to directory.
Take notice that if you run scripts or crontabs, there is a chance that if you try to run a script from a protected directory, it may not have permission to read it.
Last edited by Miati; 01-01-2015 at 11:42 PM.
Reason: forgot the not
Linux is designed to be multi-user while being secure. This is in effect. You cannot view others critical information (e.g. private keys) but sharing information isn't impeded.
If you don't agree with it, you can deny access to your entire home directory in one command, without any superuser privileges. You can also permit access to it and deny other certain folders (like Documents but permit music)
I just noticed that I forgot the "not" of being able to modify others files. Sorry! Amazing what one word left out can redirect the meaning of something.
Also - if you have a policy of blocking access to other users files (some sites do), then I suggest setting the adduser default UMASK value to (077). By default the umask used when creating the home directory is 022, which grants the owner all rights (the 0), and read/search (the 2) on directories for group and other.
Setting this to be the default means the access mode put on the home directory will be masked by 077 (so rwxrwxrwx, masked with 077 will be rwx------) and the home directory will be created with this access mode by default, without needing you to change it after it is created.
You can also look in the "/etc/skel" directory and configure some defaults you want all users to get - you can also add the command "umask 077" to the file (or add it to /etc/bashrc... but that will affect ALL users every time the login, and you may have different class of users where you don't want that to happen, or want something different).
Users can still change this once they login, but that is because they own the home directory and will own their configuration files (.bash_profile, .bash_logout, .bashrc, ...)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.