LinuxQuestions.org
Visit Jeremy's Blog.
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 05-21-2006, 01:32 PM   #1
rustyz82
Member
 
Registered: May 2004
Posts: 69

Rep: Reputation: 15
Enabling exec()


I currently have a VPS which I run web hosting from, and a couple of the scripts I want to use require the use of exec() which is currently disabled. I'm wondering what the security risks are for enabling it. No one but me and a couple of trusted users has shell access, but everyone has ftp access to thier accounts. Any advice or direction is appriciated.
 
Old 05-23-2006, 07:03 AM   #2
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Are we talking about PHP here?

If yes, you can have a look at safe mode and it's effects.

I would generally recommend to turn safe mode on for sites with multi-users access.

You can restrict exec() with safe_mode_exec_dir setting which would limit the set of commands allowed in exec().

Hope this helps.
 
Old 05-24-2006, 03:13 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Continuing on the premise we're talking about PHP I would like to remind you (all) the security risk is not only in allowing exec but more so the way it can be accessed. You probably do not need the warning, but if you look at the past few years you'll see PHP-based SW in general is not without security problems (best understatement I can make without getting all nasty), most of them being input validation related. If you deploy home brew SW please make sure you practice safe coding, if you deploy OTS, please make sure it's ready for production env use (like XAMP clearly states it's *not* and ppl still use it), maintained and supported and the latest version. Next to that see if you can afford to run an IDS, run under SELinux/GRSecurity RBAC, chroot or virtualise the whole package, run hardened-PHP, mod_security, extend logging, etc, etc for early warning, to limit damage and alerting.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
exec cmd=perl... work but exec cgi doenst crions Slackware 5 12-09-2005 12:17 PM
cannot exec 'cc1plus' martine Mandriva 3 02-26-2005 11:11 AM
c++ exec fosh Programming 2 07-04-2004 10:44 AM
PHP exec Spooky Programming 1 01-19-2004 08:34 AM
cannot exec as person Linux From Scratch 5 12-19-2003 04:31 AM

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

All times are GMT -5. The time now is 06:20 PM.

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