5 Replies - 1658 Views - Last Post: 16 April 2012 - 06:14 AM

#1 Yo!  Icon User is offline

  • D.I.C Head


Reputation: 4
  • View blog
  • Posts: 83
  • Joined: 03-September 11

Sudo for php- Apache2

Posted 10 April 2012 - 07:32 PM

Hey everyone,
Sorry I don't know shiz about apache & php(sudo req.s), I was wondering how I would get an entire php page to use sudo on my server. I understand this seems idiotic, but I was simply wondering if this was possible, if so, how?
Thanks in advance,
-Yo!
Is This A Good Question/Topic? 0
  • +

Replies To: Sudo for php- Apache2

#2 no2pencil  Icon User is offline

  • Head MFIC
  • member icon

Reputation: 5066
  • View blog
  • Posts: 26,448
  • Joined: 10-May 07

Re: Sudo for php- Apache2

Posted 10 April 2012 - 07:37 PM

Woah, that would be a huge mistake. You would be giving the world root access to your server. That is not the purpose of sudo. There has got to be another way of correcting your issue.
Was This Post Helpful? 0
  • +
  • -

#3 Yo!  Icon User is offline

  • D.I.C Head


Reputation: 4
  • View blog
  • Posts: 83
  • Joined: 03-September 11

Re: Sudo for php- Apache2

Posted 10 April 2012 - 07:42 PM

It's not an issue, simply wanting to explore around with them, I fully understand that. It's a local site ;). For clarification, I'm not an idiot, just wanting to see if possible. Simply put, it would amuse me to see how.

In other words:
I just wanna see it done.

This post has been edited by Yo!: 10 April 2012 - 07:45 PM

Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Head MFIC
  • member icon

Reputation: 5066
  • View blog
  • Posts: 26,448
  • Joined: 10-May 07

Re: Sudo for php- Apache2

Posted 10 April 2012 - 07:45 PM

Well in that case, this is a question for the apache webserver & not php code. I'll move this topic to the appropriate sub forum.

I would think this would be accomplished easier by adding the www user (or whatever user the apache daemon runs under) to the correct groups under the /etc/groups file.

The user is already required to run with above normal privileges, in order to bind ports.
Was This Post Helpful? 0
  • +
  • -

#5 Yo!  Icon User is offline

  • D.I.C Head


Reputation: 4
  • View blog
  • Posts: 83
  • Joined: 03-September 11

Re: Sudo for php- Apache2

Posted 10 April 2012 - 07:46 PM

__REMOVED__

This post has been edited by Yo!: 10 April 2012 - 08:30 PM

Was This Post Helpful? 0
  • +
  • -

#6 elhauge  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 13-April 12

Re: Sudo for php- Apache2

Posted 16 April 2012 - 06:14 AM

You could use phpseclip to do sudo:

http://phpseclib.sou...ge.net/sudo.htm
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1