LinuxQuestions.org
Help answer threads with 0 replies.
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 03-23-2010, 04:47 AM   #1
1stjambon
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
Dangers of chmod 751 on httpdocs


Hey I'll spare the long winded explanation of this to this point...

Looks like I may need to add public execute permissions to the httpdocs folder on my server for a domain... I'm just curious what sorts of dangers/vulnerabilities this could cause. Is it a big deal?

Thanks!
 
Old 03-23-2010, 04:59 AM   #2
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
Well, it's a typical setting. If noone knows the exact name of files in that directory, then noone can reach them. But for dynamic sites accessing index.(EXT) might be a start point to look up all other scripts names and read them directly. Perhaps more correct way to do that is to chown root:webserveraccountname /your/path/to/httpdocs and chmod 0710. Then, again, if your webserver will be compromised, cracker will have access to index.(EXT) so he again can do the same trick.
 
Old 03-23-2010, 04:58 PM   #3
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by 1stjambon View Post
Hey I'll spare the long winded explanation of this to this point...

Looks like I may need to add public execute permissions to the httpdocs folder on my server for a domain... I'm just curious what sorts of dangers/vulnerabilities this could cause. Is it a big deal?

Thanks!
To get access to a directory you need r-x permissions on that directory(to cd into it). Files should only get r-- permissions.
 
1 members found this post helpful.
Old 03-23-2010, 05:10 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
the exception to the above rule would be rwx for directories and rw- for files in places where files are going to be uploaded or modified by the webserver (such as temporary files, an upload directory or a cache for information downloaded from other servers, such as images etc..)

but never under any circumstances should the root directory of www or the root of the script's directory or it's configuration files or any of the program or html documents be writable by anyone but the owner of the document (also the web server should not be the owner of anything other then files uploaded via http or downloaded by scripts or created by scripts) otherwise malicious code could be injected into your web site that could be used to spread an infection to anyone who browses your site or collects information from them as they enter it into your computer

Last edited by frieza; 03-23-2010 at 05:13 PM.
 
1 members found this post helpful.
  


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
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 01:10 PM
swapoff dangers? web_janitor Linux - Server 11 11-19-2008 09:31 AM
find / -name *.test | chmod 751 Bonestein Linux - Newbie 3 03-23-2006 10:18 AM
Dangers with lm-sensors? halfpower Linux - General 1 10-02-2005 04:44 PM
cgi-bin outside httpdocs tree trondhuso Linux - Newbie 1 04-23-2004 12:21 PM

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

All times are GMT -5. The time now is 11:31 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