SunQuest
           Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old December 27th, 2002, 02:47 PM
SACurnew SACurnew is offline
MCP
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Canada
Posts: 66 SACurnew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to SACurnew
Scope of security vulnerability on world-writeable folders?

Greetings all...

As I'm hardly an expert on the internals of UNIX/Linux, I would very much appreciate it if someone could give me an actual definition of what "world-writeable" means.

I realise that some CGI scripts require a world-writeable folder in order to function, at the expense of creating a security vulnerability on the system. I'm primarily looking for information on what the scope of this security vulnerability is.

For example... If I'm in a shared hosting environment, and I set a folder within my HTML document root to be "world-writeable"... Does it mean that any other authenticated user on that system can write to the folder, or does it mean that absolutely anyone else on the entire Internet can write to the folder if they know its path? Or...?

Thank you for your attention!

- S A Curnew

Reply With Quote
  #2  
Old December 27th, 2002, 05:47 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
World writable files mean that anyone inside or outside of your group (hey.. that's EVERYONE on your system ), can write to the files. That is, all of the users, of all of the groups on your system can write to those files.

World writable files would generally NOT be considered a good idea for anything that was remotely important. Some commands will create world writable files, but otherwise, you shouldn't be assigning RWX permissions for everyone. It's probably best to just not maintain any world writable directories at all.

Reply With Quote
  #3  
Old December 27th, 2002, 11:10 PM
Epsilon Epsilon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Long Beach, California
Posts: 86 Epsilon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 10 m 34 sec
Reputation Power: 7
Some things need to be world writable though. So don't go making /tmp, etc. non-world writable.

Reply With Quote
  #4  
Old December 28th, 2002, 02:00 AM
Strike Strike is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 383 Strike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 7
Send a message via ICQ to Strike Send a message via AIM to Strike Send a message via Yahoo to Strike
Anything created by and used by a user or only a group of users never has to be world-writable. If nothing else, you should be able to set up a group which will allow all users who need to write to the file, and then give the group write access.
__________________
Debian - because life's too short for worrying.
Best. (Python.) IRC bot. ever.

Reply With Quote
  #5  
Old December 30th, 2002, 11:58 PM
SACurnew SACurnew is offline
MCP
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Canada
Posts: 66 SACurnew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to SACurnew
Thanks muchly for the replies, all.

I also appreciate the advice that nothing remotely important, or anything that is only used by a single user or group of users, should be world-writeable...

However, if you're in a shared hosting environment, you don't have the root access necessary to start configuring user and group assignments... And it's a fact of life that some CGI and PHP scripts just don't work unless you configure a world-writeable folder for them to work with... Thus why I was seeking more information on the exact security ramifications of their existence.

- S A Curnew

Reply With Quote
  #6  
Old December 31st, 2002, 09:46 AM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
What scripts are you using that need everyone to have full permissions on a directory? Even if your scripts are running as the www user, only the www user MUST have full permissions to such and such a directory. You can then (and probably should) give everyone else except the necessary programmers/maintainers absolutely NO permissions to it. That way, people can't read your CGI files and exploit them locally. Then, if you've practiced good security measures in your CGI scripting, any exploits that are executed would have to be done from the web (which won't happen, because you've practiced good security measures in your scripting... right?).

[clarification]
Epsilon - thanks for pointing that out. Clarify: Anything that you or any of your users create probably doesn't have to world-writable and probably shouldn't be unless it's some sort of dumping ground for junk like /tmp (even then... best just not to do it).
[/clarification]

Last edited by Ctb : December 31st, 2002 at 09:50 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > Scope of security vulnerability on world-writeable folders?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway