Welcome! Log In Create A New Profile

Advanced

Yet another "No input file specified." error from php-fastcgi and nginx. Related to permissions. Please help

Posted by jmcdade 
Hi all. I know this is a very common error, but I can assure you I've scoured the web and asked in IRC for a solution to this particular problem and I have no luck. I've narrowed it down to a permissions issue by setting every directory to other=executable and setting the .php file to other=read. Note, I cannot change any of these user/group permission settings. This server has to mimic a production server that is running with what seems to be the exact same users. groups, and process configuration.

I have a php5-cgi process running by the user "appsrv". nginx is run by the user "websrv". The user appsrv is in groups appsrv and websrv. The file I need to read has owner:group websrv:websrv and permissions 660. All parent directories of the file are executable for the user "appsrv".

I've tried to inclue as much relevant information as I can think of below everything that's running. (if it's easier to read, the same is posted on pastie: http://pastie.org/2373229 )

Please help. I've worked on this for hours and have no idea where to go from here. Thanks!


root@web1[dev] ~> ls -l -d1 /home/
drwxr-xr-x 14 root root 4096 Aug 3 07:57 /home/
root@web1[dev] ~> ls -l -d1 /home/foo/
ls: cannot access /home/foo/: No such file or directory
root@web1[dev] ~> ls -l -d1 /home/foo/
drwxrwx--- 14 websrv websrv 4096 Aug 9 07:54 /home/foo/
root@web1[dev] ~> ls -l -d1 /home/foo/public_html/
drwxrwx--- 40 websrv websrv 4096 Aug 14 18:13 /home/foo/public_html/
root@web1[dev] ~> ls -l -d1 /home/foo/public_html/system/
drwxrwx--- 11 websrv websrv 4096 Aug 2 15:02 /home/foo/public_html/system/
root@web1[dev] ~> ls -l -d1 /home/foo/public_html/system/loader/
drwxrwx--- 2 websrv websrv 4096 Aug 14 20:36 /home/foo/public_html/system/loader/
root@web1[dev] ~> ls -l -d1 /home/foo/public_html/system/loader/index.php
-rw-rw---- 1 websrv websrv 91 Aug 14 20:27 /home/foo/public_html/system/loader/index.php
root@web1[dev] ~> groups appsrv
appsrv : appsrv websrv
root@web1[dev] ~> getent group websrv
websrv:x:1000:appsrv,clisrv,admsrv,zazsrv
root@web1[dev] ~> ps aux | grep appsrv | head -n1
appsrv 633 0.0 4.4 19368 5624 ? Ss 21:49 0:00 /usr/bin/php5-cgi -b 192.168.1.30:32199 -c /etc/php5/cgi/php.ini

root@web1[dev] ~> cat /home/common/nginx/conf/nginx.conf # irrelevant parts omitted
user websrv;
worker_processes 2;
worker_rlimit_nofile 20480;
events {
worker_connections 512;
}
http {
include /home/common/nginx/conf/mime.types;

upstream cmspool {
server 192.168.1.30:32199;
}

root@web1[dev] ~> cat /home/common/nginx/conf/fastcgi_params.include.conf
fastcgi_pass cmspool;
fastcgi_index index.php;

# i've confirmed that $document_root$fastcgi_script_name points to the file I
# listed above: /home/foo/public_html/system/loader/index.php
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REDIRECT_STATUS 200;

# when I load the webpage, I get No input file specified.

root@web1[dev] ~> ps aux | grep nginx
root 622 0.0 0.8 8500 1092 ? Ss 21:49 0:00 nginx: master process /usr/sbin/nginx
websrv 626 0.0 1.1 8636 1420 ? S 21:49 0:00 nginx: worker process
websrv 627 0.0 1.4 8636 1788 ? S 21:49 0:00 nginx: worker process
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 137
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready