| | |
| | | return false; |
| | | } |
| | | |
| | | /* |
| | | // Alternative implementation of the is_group function. Should be faster then the old one To be tested. |
| | | function is_group($group) { |
| | | $groupfile = '/etc/group'; |
| | | if(is_file($groupfile)) { |
| | | $handle = fopen ($groupfile, "r"); |
| | | while (!feof($handle)) { |
| | | $line = trim(fgets($handle, 4096)); |
| | | if($line != ""){ |
| | | $parts = explode(":", $line); |
| | | if($parts[0] == $group) { |
| | | fclose ($handle); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | fclose ($handle); |
| | | } |
| | | return false; |
| | | } |
| | | */ |
| | | |
| | | function root_group(){ |
| | | global $app; |
| | | $group_datei = $this->server_conf["group_datei"]; |
| | |
| | | |
| | | if($user != '' && $this->is_user($user) && $user != 'root') { |
| | | $user = escapeshellarg($user); |
| | | exec("chown $user $dir $dir_cur $dir_new $dir_tmp"); |
| | | // I assume that the name of the (vmail group) is the same as the name of the mail user in ispconfig 3 |
| | | $group = $user; |
| | | exec("chown $user:$group $dir $dir_cur $dir_new $dir_tmp"); |
| | | } |
| | | |
| | | //* Add the subfolder to the subscriptions and courierimapsubscribed files |