Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-11-2007, 09:07 AM
|
#1
|
|
Member
Registered: Aug 2007
Distribution: Gentoo 2007.0
Posts: 51
Rep:
|
Setting Up A File Permissions Policy
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?
Thanks,
Mr. Snorfles
|
|
|
|
08-11-2007, 10:59 AM
|
#2
|
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: CentOS, RHEL, SourceMage, OpenBSD
Posts: 40
Rep:
|
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.
|
|
|
|
08-11-2007, 01:34 PM
|
#3
|
|
Member
Registered: Aug 2007
Distribution: Gentoo 2007.0
Posts: 51
Original Poster
Rep:
|
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.
Thanks,
Mr. Snorfles
|
|
|
|
08-12-2007, 06:10 AM
|
#4
|
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: CentOS, RHEL, SourceMage, OpenBSD
Posts: 40
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:26 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|