On Mon, 2009-08-17 at 20:16 +0530, kranthi wrote:
> >> That's a potential security flaw waiting to happen. A script like this
> >> shouldn't be kept in a web-accessible directory.
> /var/www is not the document root. document root is /var/www/html so I
> dont think there's a problem.
>
> >> /var/w
>> That's a potential security flaw waiting to happen. A script like this
>> shouldn't be kept in a web-accessible directory.
/var/www is not the document root. document root is /var/www/html so I
dont think there's a problem.
>> /var/www (usually your server root)
I am mistaken regarding this.
f
> Just out of curiosity, have you been able to run even the most basic of
> scripts from PHP, like a plain old BASH 'echo' statement or something? I
> only ask, because sometimes within the shell scripts themselves are
> calls to other command line programs (even something as simple as 'ls')
> whic
On Mon, 2009-08-17 at 17:01 +0300, Dotan Cohen wrote:
> > Did you check SELinux options ??
> >
>
> I do not have root access to that server.
>
> > I have a similar problem. For some unknown reason scan_dir() is not
> > able to read /home/user when run as Apache module. but the CLI is
> > giving e
> That's a potential security flaw waiting to happen. A script like this
> shouldn't be kept in a web-accessible directory.
>
Thanks, Ash. That directory is HTTP-password protected.
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
--
PHP General Mailing List (http://www.php.net/)
> Did you check SELinux options ??
>
I do not have root access to that server.
> I have a similar problem. For some unknown reason scan_dir() is not
> able to read /home/user when run as Apache module. but the CLI is
> giving expected results. I did not find any work around, but had to
> read /va
On Mon, 2009-08-17 at 19:23 +0530, kranthi wrote:
> Did you check SELinux options ??
>
> I have a similar problem. For some unknown reason scan_dir() is not
> able to read /home/user when run as Apache module. but the CLI is
> giving expected results. I did not find any work around, but had to
> r
Did you check SELinux options ??
I have a similar problem. For some unknown reason scan_dir() is not
able to read /home/user when run as Apache module. but the CLI is
giving expected results. I did not find any work around, but had to
read /var/www which is the home directory of 'apache' (this is
> see if can run the same php file via CLI. does script.sh run without
> any problems ? then, probably something linke SELinux is preventing
> httpd from running scripts. you have to contact your system
> administrator to get this fixed.
>
You are right. Running the php script from the CLI in an S
see if can run the same php file via CLI. does script.sh run without
any problems ? then, probably something linke SELinux is preventing
httpd from running scripts. you have to contact your system
administrator to get this fixed.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
> Please copy your script in the Linux include paths. Such as /usr/local/bin
> and give it neccecary permission and try your script again.
>
I do not have root access on this machine. That is why I run the
script from /home/username/
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
.
Thanks
-Original Message-
From: Dotan Cohen [mailto:dotanco...@gmail.com]
Sent: Sunday, August 16, 2009 9:46 PM
To: Sudheer Satyanarayana
Cc: php-general.
Subject: Re: [PHP] Cannot exec in my own directory
> Check the include path. Try using the complete path to the file. And m
> Check the include path. Try using the complete path to the file. And make
> sure the user PHP is running has read permissions to the directories upwards
> the hierarchy.
>
Thanks. I am using the complete path to the script:
exec("/home/username/script.sh");
In the /home/username/ directory ther
Dotan Cohen wrote:
I have a script in /home/username/script.sh with permissions 777. I
can SSH into the server and execute ./script.sh to run the script, but
calling it from exec in PHP does not run it. What should I start
checking?
Thanks.
Check the include path. Try using the complete path
I have a script in /home/username/script.sh with permissions 777. I
can SSH into the server and execute ./script.sh to run the script, but
calling it from exec in PHP does not run it. What should I start
checking?
Thanks.
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
--
PHP Ge
15 matches
Mail list logo