Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
All I can find on file permissions is how to user chmod, chgrp, etc. Are there any good sites you folks know of that talk strategies for setting up secure file permission schemes?
For instance, which system files to leave world readable, and which ones can be made only readable by root. Or things like setting good policies for putting users into groups with minimum necessary access rights?
I'm not aware of such a site but it might very well exist. Anyway, the default permissions are usually quite a good compromise between security and usability imo. If you want to tighten things you can for example change the umask to 027 which makes files rw for the owner, r for the group and the rest can't access it whatsoever. Though this just applies to files and dirs created after the change of umask.
Other files you might want to restrict access to might be the logs in /var/log (and sometimes other places) and perhaps the firewall and other security related info. Obviously ssh keys need to have restrictive permissions but ssh will remind you if you use a key that is world readable.
Otherwise, just sit down and think about what data is for only one user to see and which data should be shared.
Is it OK to block access to /etc for non-root users?
What about system configuration programs? I know some programs like apache have their own username, so I was worried that if I made everything accessible only to root, that some programs wouldn't be able to function properly, as a result of not having sufficient permissions to access files they need. Would I completely lock myself out if I made everything in the /etc folder only visible to root? Or is it OK to just block everything, and just see which programs give me permission denied messages and fix the problems as they come up. I just don't want to test it to find out, and discover that my system isn't usable anymore.
It is definitely a BAD idea to make all files in /etc only readable by root. There are a lot of files that NEED to be read by users.
Anyway, I need to ask you this: Which info do you consider secret in /etc? Most of the things there are of little or no use to an attacker.
But if you want to have more restrictive permissions in /etc I suggest you start small with perhaps the configuration for apache or some other server. Make sure you take a backup of /etc before starting to experiment.