HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   user/group www-data (http://www.howtoforge.com/forums/showthread.php?t=57308)

TheFuzzy0ne 16th May 2012 21:32

user/group www-data
 
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.

falko 17th May 2012 12:56

That's strange. Did you check the Apache vhost configuration and the Fast-CGI starter file?

TheFuzzy0ne 17th May 2012 14:48

I haven't, because I'm not quite sure what I'm looking for. xD (Sorry)

TheFuzzy0ne 21st May 2012 19:20

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.

till 22nd May 2012 08:09

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.

TheFuzzy0ne 22nd May 2012 14:26

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?

falko 23rd May 2012 14:27

Quote:

Originally Posted by TheFuzzy0ne (Post 279496)
On the PHP dropdown box, would it help if I changed that from Fast-CGI to SuPHP?

It should work with FastCGI as well. Can you post the Apache vhost configuration of that website?

TheFuzzy0ne 23rd May 2012 15:16

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 webmaster@sfogb.mydomain.com
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. :)

falko 24th May 2012 13:28

Quote:

Originally Posted by TheFuzzy0ne (Post 279573)
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?

I suggest you undo your changes and test again.


All times are GMT +2. The time now is 11:38.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.