suPHP mit plesk7.5 und suse 9.1

Apache, Lighttpd, nginx, Cherokee
Post Reply
gud-hiebl
Posts: 7
Joined: 2005-06-25 17:49
 

suPHP mit plesk7.5 und suse 9.1

Post by gud-hiebl »

Jetzt hab ich auch mal ein Problem...und ich komm einfach nicht drauf. Bis jetzt hab mir die suche immer weitergeholfen. Aber jetzt finde ich nichts.

System:
Suse 9.1, Plesk7.5.4, Apache2 läuft mit SuExec

Problem:
Wenn man über ein php Script eine Datei hochladet ist diese own:wwwrun und grp:www
Jetzt kann man per ftp diese Datei z.b. nicht mehr löschen. Kann ich das irgendwie machen das der der besitzer und die gruppe hier anders sind.
Gutes beispiel.. bei 1und1 Webspace ist das der fall das dies gleich dem ftp sind, und es gibt somit dieses Problem nicht.

Habt ihr da was für mich?
Last edited by gud-hiebl on 2005-11-20 23:11, edited 1 time in total.
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: php erstelte Datei - user und gruppe - vhost

Post by Roger Wilco »

gud-hiebl wrote:Habt ihr da was für mich?
Lass PHP über SuPHP oder als CGI mit SuExec laufen.
gud-hiebl
Posts: 7
Joined: 2005-06-25 17:49
 

Re: suPHP mit plesk7.5 und suse 9.1

Post by gud-hiebl »

ok.. ich verstehe die ganze sache nach langem suchen immer noch nicht.

SuExec läuft ja Standart in Plesk. mod_php wird laut phpinfo nicht geladen.

Hab jetzt auch mal suPhp drauf. modul wird geladen suPHP_Engine ist on aber alles keinen effekt.

Also irgendwas mach ich falsh glaube ich.
lord_pinhead
Posts: 774
Joined: 2004-04-26 15:57
 

Re: suPHP mit plesk7.5 und suse 9.1

Post by lord_pinhead »

Wie ist deine Vhost einstellung?
gud-hiebl
Posts: 7
Joined: 2005-06-25 17:49
 

Re: suPHP mit plesk7.5 und suse 9.1

Post by gud-hiebl »

teil der httpd.conf in /etc/apache2

Code: Select all

LoadModule suphp_module /usr/lib/apache2/mod_suphp.so
suPHP_Engine On
hätte es eigentlich global auf on.
wenn ich in der vhost.conf

suPHP_UserGroup user group
einfgüge startet apache nicht mehr.

httpd.include in home/httpd/vhosts/domain.tld/conf/

Code: Select all

<VirtualHost 85.xxx.xxx.xxx:80>
	ServerName   domain.tld:80
	ServerAlias  www.domain.tld
	UseCanonicalName Off
		SuexecUserGroup         vhostusername psacln
	ServerAdmin  e.mail@domain.tld
	DocumentRoot /home/httpd/vhosts/domain.tld/httpsdocs
	CustomLog  /home/httpd/vhosts/domain.tld/statistics/logs/access_ssl_log plesklog
	ErrorLog     /home/httpd/vhosts/domain.tld/statistics/logs/error_ssl_log
<IfModule mod_userdir.c>
	UserDir /home/httpd/vhosts/domain.tld/web_users
</IfModule>
	ScriptAlias  /cgi-bin/ /home/httpd/vhosts/domain.tld/cgi-bin/
	Alias  /plesk-stat /home/httpd/vhosts/domain.tld/statistics/
	Alias  /webstat /home/httpd/vhosts/domain.tld/statistics/webstat
	Alias  /webstat-ssl /home/httpd/vhosts/domain.tld/statistics/webstat-ssl
	Alias  /ftpstat /home/httpd/vhosts/domain.tld/statistics/ftpstat
	Alias  /anon_ftpstat /home/httpd/vhosts/domain.tld/statistics/anon_ftpstat
	SSLEngine on
	SSLVerifyClient none
	SSLCertificateFile /usr/local/psa/var/certificates/certuh16942
	<Directory /home/httpd/vhosts/domain.tld/httpsdocs>
	<IfModule mod_perl.c>
	<Files ~ (.pl$)>
		SetHandler perl-script
		PerlHandler ModPerl::Registry
		Options ExecCGI
		allow from all
		PerlSendHeader On
	</Files>
	</IfModule>
	<IfModule mod_perl.c>
	<Files ~ (.asp$)>
		SetHandler perl-script
		PerlHandler Apache::ASP
		PerlSetVar Global /tmp
	</Files>
	</IfModule>
	<IfModule sapi_apache2.c>
		php_admin_flag engine on
		php_admin_value open_basedir "/home/httpd/vhosts/domain.tld/httpsdocs:/tmp"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_value open_basedir "/home/httpd/vhosts/domain.tld/httpsdocs:/tmp"
	</IfModule>
	<IfModule mod_python.c>
	<Files ~ (.py$)>
		SetHandler python-program
		PythonHandler	mod_python.cgihandler
	</Files>
	</IfModule>
		SSLRequireSSL
		Options +Includes +ExecCGI
	</Directory>
	<Directory /home/httpd/vhosts/domain.tld/web_users>
	<IfModule sapi_apache2.c>
		AddType text/plain .php .php4 .php3 .phtml
		php_admin_flag engine off
	</IfModule>
	<IfModule mod_php5.c>
		AddType text/plain .php .php5 .php4 .php3 .phtml
		php_admin_flag engine off
	</IfModule>
	</Directory>
	Alias "/error_docs" "/home/httpd/vhosts/domain.tld/error_docs"
	ErrorDocument 400 /error_docs/bad_request.html
	ErrorDocument 401 /error_docs/unauthorized.html
	ErrorDocument 403 /error_docs/forbidden.html
	ErrorDocument 404 /error_docs/not_found.html
	ErrorDocument 500 /error_docs/internal_server_error.html
</VirtualHost>
apache error_log

Code: Select all

...
[Sun Nov 20 20:29:15 2005] [warn] child process 27919 still did not exit, sending a SIGTERM
[Sun Nov 20 20:29:15 2005] [warn] child process 27920 still did not exit, sending a SIGTERM
[Sun Nov 20 20:29:15 2005] [warn] child process 27911 still did not exit, sending a SIGTERM
[Sun Nov 20 20:29:15 2005] [warn] child process 27810 still did not exit, sending a SIGTERM
[Sun Nov 20 20:29:15 2005] [warn] child process 27921 still did not exit, sending a SIGTERM
[Sun Nov 20 20:29:15 2005] [warn] child process 27871 still did not exit, sending a SIGTERM
[Sun Nov 20 20:29:16 2005] [notice] caught SIGTERM, shutting down
suphp habe ich so kompeliert

Code: Select all

./configure --with-prefix=/usr --with-apxs=/usr/sbin/apxs2 --with-min-uid=0 --with-min-gid=0 --with-apache-user=apache --with-php=/usr/bin/php --with-logfile=/var/log/httpd/suphp_log --with-setid-mode=owner
Was mir auffält suphp legt die logdatei nicht an
gud-hiebl
Posts: 7
Joined: 2005-06-25 17:49
 

Re: suPHP mit plesk7.5 und suse 9.1

Post by gud-hiebl »

habs jetzt nochmal gelöscht und neu kompelliert. ist mir vorher garnicht aufgefallen....das ich ein error hatte

make install ergebnis... die letzen zeilen

Code: Select all

chmod 755 /usr/lib/apache2/mod_suphp.so
apxs:Error: Config file /etc/apache2/httpd2-prefork.conf not found.
make[2]: *** [install] Error 1
make[2]: Leaving directory `/root/downloads/suphp-0.5.2/src/apache2'
make[1]: Leaving directory `/root/downloads/suphp-0.5.2/src'
Post Reply