strange problem adding a new user to a group

Discussion in 'Installation/Configuration' started by gilas, Jun 30, 2010.

  1. gilas

    gilas Member

    Hi "moderator"
    thank you for your great work.

    I suffering due to a strange problem, here described:

    o.s./sw data:
    Debian Lenny
    ISPConfig Version: 2.2.35

    1. I added some code to force ISPConfig to add a news user to a group, for my o.s. is 'www-data'.

    2. Looking for the code located in:

    line # 534
    function add_user_to_group($group, $user = 'admispconfig'){
    the user is added correctly and the whole file /etc/group is updated (re-written).
    All is ok, I verified it adding after this line:
    $mod->file->wf($this->server_conf["group_datei"], $new_group_file);

    3. just added a new user to the group create (i.e. web100), through the method:
    this code:
    $group_file = $mod->file->rf($this->server_conf["group_datei"]);
    (then the group file /etc/group is read and saved into the $group_file var)
    then I send the var via email:
    mail("[email protected]","group file",$group_file);

    4. all is ok I receive the whole content without problems and the www-data group is added.

    5. some seconds after this I check with the linux command:
    groups www-data

    the output show (only) for few seconds the group added, i.e.:

    www-data web10 web11 web100

    6. I repeat the linux command described above (step 5)
    and the group added disappeared!

    what happens?!?

    Thank you very much for your answer, cordially

Share This Page