Current time: 11-23-2024, 01:00 PM Hello There, Guest! (LoginRegister)


Post Reply 
fastcgi incomplete headers issues
Author Message
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #61
RE: fastcgi incomplete headers issues
hm
***
vu2000@troxan:~$ ./test.sh
hello

vu2000@troxan:~$ cat test.sh
#!/bin/sh

echo 'hello'
***

works on my system.

if you replace the first line to #!/bin/bash instead of #!/bin/sh
(in the test.sh first, if ok, try it in the php starter script)

But I don't know what's the problem with this...

/J
01-15-2008 09:57 PM
Visit this user's website Find all posts by this user Quote this message in a reply
blunt Offline
Junior Member
*

Posts: 40
Joined: Jan 2008
Reputation: 0
Post: #62
RE: fastcgi incomplete headers issues
I really don't unserstand what I can do...

I changed from /bin/sh to /bin/bash and here is the output:

ispcp:~# su -s /bin/bash - vu2000
vu2000@ispcp:~$ cd /var/www/fcgi/master/
vu2000@ispcp:~$ ./test.sh
-su: ./test.sh: /bin/bash: bad interpreter: Permission denied
01-15-2008 09:59 PM
Find all posts by this user Quote this message in a reply
zpin Offline
Junior Member
*****
Dev Team

Posts: 160
Joined: Sep 2007
Reputation: 1
Post: #63
RE: fastcgi incomplete headers issues
blunt Wrote:zpin, I may be wrong, but it doesn't seem to be a problem with exec/noexec permissions on the partitions, because as root I can execute he file:

ispcp:~# /var/www/fcgi/master/test.sh
Hello!
ispcp:~#
well, considering the weirdness of the problem I'd try it anyways Smile
01-15-2008 09:59 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #64
RE: fastcgi incomplete headers issues
blunt Wrote:I really don't unserstand what I can do...

I changed from /bin/sh to /bin/bash and here is the output:

ispcp:~# su -s /bin/bash - vu2000
vu2000@ispcp:~$ cd /var/www/fcgi/master/
vu2000@ispcp:~$ ./test.sh
-su: ./test.sh: /bin/bash: bad interpreter: Permission denied

Ups...
you can execute the shells directly but you cannot use them as sheebang (interpreter) in scripts...

btw: you don't need to run "cd /var/www/fcgi/master/" as vu2000 - this is already the home... :-)

How do you change the content of eg test.sh? (vi or mcedit?)

/J
01-15-2008 10:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
blunt Offline
Junior Member
*

Posts: 40
Joined: Jan 2008
Reputation: 0
Post: #65
RE: fastcgi incomplete headers issues
I use nano to edit the files...
01-15-2008 10:16 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #66
RE: fastcgi incomplete headers issues
another idea:

copy the test.sh (as root) to /test.sh and try to run it as user vu2000

/J
01-15-2008 10:16 PM
Visit this user's website Find all posts by this user Quote this message in a reply
blunt Offline
Junior Member
*

Posts: 40
Joined: Jan 2008
Reputation: 0
Post: #67
RE: fastcgi incomplete headers issues
zpin, I've set the exec flag, still got the same problem...

ispcp:~# mount
/dev/simfs on / type reiserfs (rw,usrquota,grpquota,exec)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid)
proc on /proc type proc (rw,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
ispcp:~# sudo su vu2000 -c '/var/www/fcgi/master/test.sh'
sh: /var/www/fcgi/master/test.sh: /bin/bash: bad interpreter: Permission denied
01-15-2008 10:17 PM
Find all posts by this user Quote this message in a reply
blunt Offline
Junior Member
*

Posts: 40
Joined: Jan 2008
Reputation: 0
Post: #68
RE: fastcgi incomplete headers issues
joximu well this is something!

ispcp:~# cp /var/www/fcgi/master/test.sh /test.sh
ispcp:~# su -s /bin/bash - vu2000
vu2000@ispcp:~$ /test.sh
Hello!

I can now access the file...but I really can't figure out what this means...
01-15-2008 10:19 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #69
RE: fastcgi incomplete headers issues
ok, "go" down with the file /var, /var/www etc...

seems that somewhere it's stopping...

/J
01-15-2008 10:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
blunt Offline
Junior Member
*

Posts: 40
Joined: Jan 2008
Reputation: 0
Post: #70
RE: fastcgi incomplete headers issues
looks like it stops at /var/www/fcgi

ispcp:~# mv /test.sh /var/test.sh
ispcp:~# su -s /bin/bash - vu2000
vu2000@ispcp:~$ /var/test.sh
Hello!
vu2000@ispcp:~$ exit
logout
ispcp:~# mv /var/test.sh /var/www/test.sh
ispcp:~# su -s /bin/bash - vu2000
vu2000@ispcp:~$ /var/www/test.sh
Hello!
vu2000@ispcp:~$ exit
logout
ispcp:~# mv /var/www/test.sh /var/www/fcgi/test.sh
ispcp:~# su -s /bin/bash - vu2000
vu2000@ispcp:~$ /var/www/fcgi/test.sh
-su: /var/www/fcgi/test.sh: /bin/bash: bad interpreter: Permission denied
01-15-2008 10:28 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)