Incorrect group when uploading via FTP of FileManager

dronium

New member
Joined
Dec 16, 2010
Messages
2
Strange problem - after uploading files via FTP or creating new file in Files it have group 'apache' but suphp requires same group as user. (500 error).

How can i fix this in settings? So all new uploaded files have permittons username:username instead of usernamse:apache

thanks
 
How can i fix this in settings? So all new uploaded files have permittons username:username instead of usernamse:apache

thanks


If user's public_html is owned by group apache, all files and directory will inherit group owner on creation.

To disable it for new domains, change settings to

Code:
apache_public_html=0

http://www.directadmin.com/features.php?id=497



p.s. chown -R username:username /path/to/folder
 
already found this

for old accounts wrote fix:

Code:
#!/usr/bin/perl

@list=`ls -la /home/ |  awk '{print \$3}'`;

for ($i=0;$i<=$#list;$i++)
{
    $user=$list[$i];
    chomp($user);

    if (($user ne '.')&&($user ne '..')&&($user ne 'root')&&($user ne 'admin')&&($user ne '')&&($user ne 'mysql'))
    {
        system("chown -R $user:$user /home/$user/domains");
         system("chown $user:$user /home/$user/public_html");

        @domains=`ls -la /home/$user/domains | awk '{print \$9}'`;

        for ($j=0;$j<=$#domains;$j++)
        {
                $domain=$domains[$j];
                chomp($domain);
                if (($domain ne '.')&&($domain ne '..')&&($domain ne ''))
                {
                    system ("chown -R $user:$user /home/$user/domains/$domain/public_html");
                    system ("chmod 755 /home/$user/domains/$domain/public_html");

                }
        }
    }

}
 
Back
Top