Ask a Question related to FreeBSD, Design and Development.
-
Paul #1
shell_exec sudo problem
For some reason I can't get sudo to work from an online php script using
shell_exec.
I have put this in the sudoers file:
www ALL=(ALL) ALL
(full access is temporary until I get it working)
When I run:
echo shell_exec("sudo echo hello");
in a php script in a web page running on apache2, it does nothing - I don't
get any feedback.
echo shell_exec("whoami"); confirms that www is the correct user.
Any ideas?
Paul
Paul Guest
-
sudo command
hi guys, newbie question here: Just loaded the ubuntu image from VMWare that has "ubuntu" as default root password. However, if i do a "su"... -
[PHP] shell_exec
* Thus wrote John (hippiejohn@cox.net): The odds are that the perl script is running the code. The problem most likely is permissions. The web... -
[PHP] shell_exec
Rodney Green wrote: Shell side: - must be readable and executable by user (apache or perhaps everyone) - suid bit work only for programs, not... -
How to override SECURE_PATH in sudo?
Hi, I am trying to setup sudo to allow users to run files under /opt/bin without having to type in the full path to the executable. In woody,... -
sudo doesn't work
hi list, i have a little problem with my sudo here on debian v.3. what i would like to do: a php-based web-interface should be able to run some... -
Bas Essers #2
Re: shell_exec sudo problem
you should take a look at apache error log to see what sudo says.
i''ve never used sudo but when i make a shell script SUID 0, bash tells me
it is too dangerous to run a script in SUID 0. and that's probably
true because a lot can be modified in a script thru the environment.
On Sat, 19 Feb 2005 18:50:45 -0000, Paul <paul@theharbour.eclipse.co.uk> wrote:> For some reason I can't get sudo to work from an online php script using
> shell_exec.
>
> I have put this in the sudoers file:
>
> www ALL=(ALL) ALL
>
> (full access is temporary until I get it working)
>
> When I run:
>
> echo shell_exec("sudo echo hello");
>
> in a php script in a web page running on apache2, it does nothing - I don't
> get any feedback.
>
> echo shell_exec("whoami"); confirms that www is the correct user.
>
> Any ideas?
>
> Paul
>
> _______________________________________________
> [email]freebsd-questions@freebsd.org[/email] mailing list
> [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>
--
Met vriendelijke groet,
Bas Essers
Bas Essers Guest
-
Paul #3
RE: shell_exec sudo problem
Found the problem in the log file - the sudo command wasn't being found.
Thanks!
-----Original Message-----
From: [email]owner-freebsd-questions@freebsd.org[/email]
[mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Bas Essers
Sent: 19 February 2005 20:43
To: [email]freebsd-questions@freebsd.org[/email]
Subject: Re: shell_exec sudo problem
you should take a look at apache error log to see what sudo says.
i''ve never used sudo but when i make a shell script SUID 0, bash tells me
it is too dangerous to run a script in SUID 0. and that's probably
true because a lot can be modified in a script thru the environment.
On Sat, 19 Feb 2005 18:50:45 -0000, Paul <paul@theharbour.eclipse.co.uk>
wrote:don't> For some reason I can't get sudo to work from an online php script using
> shell_exec.
>
> I have put this in the sudoers file:
>
> www ALL=(ALL) ALL
>
> (full access is temporary until I get it working)
>
> When I run:
>
> echo shell_exec("sudo echo hello");
>
> in a php script in a web page running on apache2, it does nothing - I"freebsd-questions-unsubscribe@freebsd.org"> get any feedback.
>
> echo shell_exec("whoami"); confirms that www is the correct user.
>
> Any ideas?
>
> Paul
>
> _______________________________________________
> [email]freebsd-questions@freebsd.org[/email] mailing list
> [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
> To unsubscribe, send any mail to>
--
Met vriendelijke groet,
Bas Essers
Paul Guest



Reply With Quote

