LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-22-2005, 06:41 PM   #1
CodeFish
LQ Newbie
 
Registered: Apr 2004
Distribution: Mandrake
Posts: 11

Rep: Reputation: 0
would you recommend chmod -R 755 *?


Newbie security question:

Would you recommend chmod -R 755 * from / as a general permissions security blanket? What are the drawbacks to this approach? I haven't really seen a catch-all recomendation like this in tutorials, but it is what I have done. Just wondering if there are better possibilities (I am a single user).
 
Old 01-22-2005, 07:00 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
I wouldn't recommend that at all... I always use a default umask of 077 which means new files will be rwx for the owner only, and have no access for anyone else.

However, most people find 022 more reasonable, which gives you the 755 permissions you mentioned.

Be careful about your sudo config if you use sudo however, that should never be writable for anyone.
 
Old 01-22-2005, 10:49 PM   #3
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
@CodeFish: In fact that is an exceedingly bad idea. You need to be very careful when modifying file permissions, especially when it comes to critical system files. By giving everything 755 permissions, you'd allow anyone to read the password hashes in /etc/passwd or /etc/shadow, which could then be bruteforced rather trivially. You'd also allow anyone to read each others private encryption keys (like ssh private keys), read your firewall rulesets, daemon configuration files, and other critical files that shouldn't be readable except to root. You'd also be allowing anyone on the system to execute any command as well. So joe user could fireup fdisk and blow away your entire filesystem. I'd also bet that you'd experience some random problems with applications trying to use temporary files as many applications need fairly lenient file permissions in /tmp.

It may seem like none of that may apply to someone on a single user system, but file system permissions are an integral part in security and by weakening them, you are making it significantly easier for someone to compromise or damage your system. If you are interested in locking down file permissions, take a look at tools like bastille, Mandrakes built-in security tool called msec or even something like grsecurity instead.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 05:37 AM
chmod 755 won't change file permission. duffboygrim Linux - General 11 04-29-2004 06:17 PM
Should the apached httpd.conf be chmod to 755? harlow400 Linux - Newbie 6 02-13-2004 11:28 PM
CGI without having to CHMOD 755 all the time. qistoph Linux - Software 9 06-21-2002 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration