Current time: 11-16-2024, 12:03 PM Hello There, Guest! (LoginRegister)


Post Reply 
fastcgi incomplete headers issues
Author Message
blunt Offline
Junior Member
*

Posts: 40
Joined: Jan 2008
Reputation: 0
Post: #41
RE: fastcgi incomplete headers issues
does anyone know why this is happening?

I don't know what else to try...
01-15-2008 09:13 AM
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: #42
RE: fastcgi incomplete headers issues
We could make further tests:

copy the php5-fcgi-starte into test.sh and change the content of the file to this:
Code:
#!/bin/sh

echo "hello"

and execute the file.

Well, it's only to check where's the problem.

If still problems to execute: move the file to somwehre else /var/www - and test it there... and so on...
01-15-2008 09:19 AM
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: #43
RE: fastcgi incomplete headers issues
well I changed the contents of the file to what you said, named it as test.sh. Here is the output:

ispcp:/var/www/fcgi/master# sudo -u vu2000 /var/www/fcgi/master/test.sh
sudo: unable to execute /var/www/fcgi/master/test.sh: Permission denied
ispcp:/var/www/fcgi/master# sudo -u vu2000 mv /var/www/fcgi/master/test.sh /test.sh
mv: cannot move `/var/www/fcgi/master/test.sh' to `/test.sh': Permission denied
ispcp:/var/www/fcgi/master# sudo -u vu2000 mv /var/www/fcgi/master/test.sh /var/www/fcgi/test.sh
ispcp:/var/www/fcgi/master# sudo -u vu2000 /var/www/fcgi/test.sh
sudo: unable to execute /var/www/fcgi/test.sh: Permission denied
ispcp:/var/www/fcgi/master# sudo -u vu2000 mv /var/www/fcgi/test.sh /var/www/test.sh
mv: cannot move `/var/www/fcgi/test.sh' to `/var/www/test.sh': Permission denied
ispcp:/var/www/fcgi/master# sudo -u vu2000 mv /var/www/fcgi/test.sh /var/test.sh
mv: cannot move `/var/www/fcgi/test.sh' to `/var/test.sh': Permission denied
ispcp:/var/www/fcgi/master# sudo -u vu2000 mv /var/www/fcgi/test.sh /test.sh
mv: cannot move `/var/www/fcgi/test.sh' to `/test.sh': Permission denied

I used sudo to move the file to check for permission problems...
And I can't go anywhere beyond /var/www/fcgi/

still can't figure out the problem...

here is the result of ls
ispcp:/var/www/fcgi# ls -la
total 16
drwxr-xr-x 3 vu2000 vu2000 4096 Jan 15 10:08 .
drwxr-xr-x 8 root root 4096 Jan 8 10:20 ..
drwxr-xr-x 4 vu2000 vu2000 4096 Jan 15 10:08 master
-rwxr-xr-x 1 vu2000 vu2000 25 Jan 15 10:07 test.sh

thank you
01-15-2008 08:11 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: #44
RE: fastcgi incomplete headers issues
Well - the moving around is not possible for user vu2000 - only the executing.

Just for your info:try a
sudo -u vu2000 /bin/bash
to get a new shell with vu2000 permissions - so you don't need to sudo everything...
back with "exit".

I'd open a second shell (putty if you come from windows) for root access.
(This post was last modified: 01-15-2008 08:25 PM by joximu.)
01-15-2008 08:24 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: #45
RE: fastcgi incomplete headers issues
sudo -u vu2000 /bin/bash
bash: /root/.bashrc: Permission denied

can't do that...is that the problem?
01-15-2008 08:28 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: #46
RE: fastcgi incomplete headers issues
Well, there is the problem.

it seems that all bash are trying to load /root/.bashrc - which of course is not possible for all users (thank god :-)

could you do a "grep -r bashrc /etc"
or maybe it's somewhere in /var/www/fcgi/master/.bash*
and also grep vu2000 /etc/passwd

/J
01-15-2008 08:59 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: #47
RE: fastcgi incomplete headers issues
here is the output of the three commands.

ispcp:~# grep -r bashrc /etc
/etc/bash.bashrc:# System-wide .bashrc file for interactive bash(1) shells.
grep: /etc/fonts/conf.d/30-defoma.conf: No such file or directory
/etc/skel/.bash_profile:# include .bashrc if it exists
/etc/skel/.bash_profile:if [ -f ~/.bashrc ]; then
/etc/skel/.bash_profile: . ~/.bashrc
/etc/skel/.bashrc:# ~/.bashrc: executed by bash(1) for non-login shells.
/etc/skel/.bashrc:# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
/etc/skel/.bashrc:# sources /etc/bash.bashrc).


ispcp:~# grep -r bashrc /var/www/fcgi/master/.bash*
/var/www/fcgi/master/.bash_profile:# include .bashrc if it exists
/var/www/fcgi/master/.bash_profile:if [ -f ~/.bashrc ]; then
/var/www/fcgi/master/.bash_profile: . ~/.bashrc
/var/www/fcgi/master/.bashrc:# ~/.bashrc: executed by bash(1) for non-login shells.
/var/www/fcgi/master/.bashrc:# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
/var/www/fcgi/master/.bashrc:# sources /etc/bash.bashrc).

ispcp:~# grep vu2000 /etc/passwd
vu2000:x:2000:2000:vu-master:/var/www/fcgi/master:/bin/sh

is it trying to find /root/.bashrc because I'm running as root?
01-15-2008 09:05 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: #48
RE: fastcgi incomplete headers issues
You can try to run your commands with
Code:
sudo su vu2000 -c 'COMMAND'

e.g.
sudo su vu2000 -c '/var/www/fcgi/master/test.sh'
01-15-2008 09: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: #49
RE: fastcgi incomplete headers issues
I still get permission denied...

ispcp:~# sudo su vu2000 -c '/var/www/fcgi/master/test.sh'
sh: /var/www/fcgi/master/test.sh: /bin/sh: bad interpreter: Permission denied
01-15-2008 09:20 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: #50
RE: fastcgi incomplete headers issues
blunt Wrote:is it trying to find /root/.bashrc because I'm running as root?

I don't know why it tries to load the bashrc from /root - normally it should load it from his own homedir (which is set correctly in the passwd)

But: just found out: i get the same if I change the permissions of /root to rwx------ instead of (default) rwxr-xr-x (I thought /root is more secured..)

try this one

su -s /bin/bash - vu2000

and then try with loading the php5... starter script as vu2000

/J
01-15-2008 09:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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