Hi there. Recently I did an update on my server using aptitude, and lately I've noticed a problem. The problem could be related, but I'm not sure. For some reason, all files uploaded via PHP are showing as having the user and group set to www-data and not client1 as it should do. The site in question is set up to use FastCGI (I think that was the default) and not suPHP. Please could you tell me what I need to change to put it back the way it was? The Web site was shared over Dropbox, and at the moment, external changes won't sync because of the issue with permissions. Many thanks in advance.
I'm bumping this hoping for some guidance. I can find my way around a Linux system easily, but I'm not sure where ISPC keeps it's configuration files, or what I can/can't change without breaking my Web server. Many thanks in advance.
If you use fastcgi, then ensure that the checkbox "suexec" is enabled in that website. If suexec is not enabled, then all uploaded data is owned by a wrong user and group.
Thanks for the reply. The SuEXEC checkbox is checked, and was already checked. I'd appreciate any more suggestions. On the PHP dropdown box, would it help if I changed that from Fast-CGI to SuPHP?
Sure! Code: <Directory /var/www/sfogb.mydomain.com> AllowOverride None Order Deny,Allow Deny from all </Directory> <VirtualHost *:80> DocumentRoot /var/www/sfogb.mydomain.com/web ServerName sfogb.mydomain.com ServerAdmin [email protected] DirectoryIndex index.php index.html ErrorLog /var/log/ispconfig/httpd/sfogb.mydomain.com/error.log ErrorDocument 400 /error/400.html ErrorDocument 401 /error/401.html ErrorDocument 403 /error/403.html ErrorDocument 404 /error/404.html ErrorDocument 405 /error/405.html ErrorDocument 500 /error/500.html ErrorDocument 502 /error/502.html ErrorDocument 503 /error/503.html <IfModule mod_ssl.c> </IfModule> <Directory /var/www/sfogb.mydomain.com/web> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> <Directory /var/www/clients/client1/web2/web> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> # suexec enabled SuexecUserGroup daz client1 # Clear PHP settings of this website <FilesMatch "\.ph(p3?|tml)$"> #SetHandler None </FilesMatch> # php as fast-cgi enabled # For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html <IfModule mod_fcgid.c> #IdleTimeout 300 #ProcessLifeTime 3600 ## MaxProcessCount 1000 #DefaultMinClassProcessCount 0 #DefaultMaxClassProcessCount 100 #IPCConnectTimeout 3 #IPCCommTimeout 360 #BusyTimeout 300 </IfModule> <Directory /var/www/sfogb.mydomain.com/web> #AddHandler fcgid-script .php .php3 .php4 .php5 AddHandler php5-script .php #AddHandler php-fastcgi .php #FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php Options +ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> <Directory /var/www/clients/client1/web2/web> #AddHandler fcgid-script .php .php3 .php4 .php5 #AddHandler x-httpd-php5 .php AddHandler php5-script .php #AddHandler php5-fastcgi .php #FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php Options +ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> # add support for apache mpm_itk <IfModule mpm_itk_module> AssignUserId web2 client1 </IfModule> <IfModule mod_dav_fs.c> # Do not execute PHP files in webdav directory <Directory /var/www/clients/client1/web2/webdav> <FilesMatch "\.ph(p3?|tml)$"> SetHandler None </FilesMatch> </Directory> # DO NOT REMOVE THE COMMENTS! # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE! # WEBDAV BEGIN Alias /webdav/sfogb /var/www/clients/client1/web2/webdav/sfogb <Location /webdav/sfogb> DAV On AuthType Digest AuthName "sfogb" AuthUserFile /var/www/clients/client1/web2/webdav/sfogb.htdigest Require valid-user Options +Indexes Order allow,deny Allow from all </Location> # WEBDAV END </IfModule> AccessFileName .htaccess2 </VirtualHost> Looking at it now, I have a vague recollection of commenting out some of the lines due to the problem mentioned here, but I'm not sure. I wonder if that's what's broken it? Thanks for your assistance so far.