Changing group directories

Discussion in 'Installation/Configuration' started by dgmufasa, Dec 26, 2011.

  1. dgmufasa

    dgmufasa New Member

    Hello all,

    I have a job that needs to run on every ftp/ssh user directory created under a website.

    What would be nice is to do something like
    1. Create group for batch user (ex: mygroup)
    2. Create batch user -
    3. Assign batch user to batch group
    4. Create web user with ID web xxx group: mygroup
    ex: chown webxxx.mygroup directory (of created web user)


    How can this be done within ISPConfig? I know that functions like ftp_user_add will allow you to set the group during
    creation - but - how does one create the group to start off with?


    As of now, when directories are created, they have the following for user owner and group owner:

    drwxr-xr-x 2 web529 client692 4096 Dec 21 13:11 M035370file
    drwxr-xr-x 3 web529 client692 4096 Dec 21 13:11 M035370depo
    drwx------ 3 web529 client692 4096 Dec 26 15:00 m035370depo


    in this case, the group owner is : client692.

    Can I change this so that the group owner is something else like : mygroup so it would read:

    drwxr-xr-x 2 web529 mygroup 4096 Dec 21 13:11 M035370file
    drwxr-xr-x 3 web529 mygroup 4096 Dec 21 13:11 M035370depo
    drwx------ 3 web529 mygroup 4096 Dec 26 15:00 m035370depo

    without it hurting the way ISPConfig would run?

    TIA
     
    Last edited: Dec 26, 2011
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    instaed of cahnging the permissions, better run the batch job as root cronjob. Changing the permissions in the way yo described above would make the system insecure and you will change the ispconfig sourcecode to do that.
     
  3. dgmufasa

    dgmufasa New Member

    Hello and thanks for the response.

    Quick question:

    Is it possible for a one user to belong to more than one group in ISPConfig 3? By "user", I mean a user that has an entry in /etc/passwd and has its group defined in /etc/group.

    If so, how can this be accomplished?

    There is a perl program that must be defined in /etc/postfix/master.cf

    It is defined as a service.

    runme unix - n n - - pipe
    user=<what_kind_of_user> argv=/var/myhome/runme.pl ${user}

    This service will put files in directories - but - the user needs to be one that can run throughout the system to put files in
    certain directories (not all). This user - of course - is defined in /etc/passwd and has a group id as well.

    The idea is to:
    1. create a group
    2. assign this user to the group
    3. create other users in the system (who also have an entry in /etc/passwd)
    4. Assign those users to the same group

    Again, not all users will fall in this category, just some. What can I do to solve this problem in ISPConfig? In a Unix environment, I would do items 1-4 - but - what can I do in an ISPConfig 3 environment?

    My thoughts are that things could remain like this:
    drwxr-xr-x 2 web529 client692 4096 Dec 21 13:11 M035370file
    drwxr-xr-x 3 web529 client692 4096 Dec 21 13:11 M035370depo
    drwx------ 3 web529 client692 4096 Dec 26 15:00 m035370depo

    but the service would still be able to run but the users (ex: M035370file and M035370depo) would be a part of *two* groups - client692 and the group created in step 1 above. More importantly, how can this be done thru the ISPConfig SOAP API?
    TIA
     
    Last edited: Dec 27, 2011
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Its the same in ispconfig. Create a new shell group with the groupadd command and then add all web users that shall be part of this group to the new group. Steps 3 and 4 are not nescessary as the users exist already.
     
  5. dgmufasa

    dgmufasa New Member

    Thanks again for the prompt reply

    >> then add all web users that shall be part of this group to the new group
    Can this be done thru an ISPConfig SOAP interface (in PHP)? If not, can you make a suggestion how it could be done?

    TIA
     

Share This Page