Results 1 to 1 of 1
Hello all,
I've recently started my first bit of shell scripting and I really have hit a dead-end. I am trying to run a very simple shell script:-
Code:
#!/bin/sh
...
- 10-02-2008 #1Just Joined!
- Join Date
- Mar 2007
- Posts
- 17
Strange permissions for www-data user
Hello all,
I've recently started my first bit of shell scripting and I really have hit a dead-end. I am trying to run a very simple shell script:-
Now when I run this as a user it works fine and even when I su www-data it works great too.Code:#!/bin/sh rawdomain=${1%%/*} echo $rawdomain echo "help" wget $1
The problem comes when I try to run this from a php script
The script does not run at all and when I check my apache errors I've gotCode:$output = array(); echo exec('/home/scripts/test.sh www.eicar.org', $output); print_r($output);
I'm really at the end of my tether now and would love some help to at least work out why I'm getting this errorCode:--20:17:58-- http://www.eicar.org/ => `index.html.1' Resolving www.eicar.org... 88.198.38.136 Connecting to www.eicar.org|88.198.38.136|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 3,887 (3.8K) [text/html] index.html.1: Permission denied Cannot write to `index.html.1' (Permission denied).
Thanks
Dan


Reply With Quote