Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  problems with new installations of httpd

    Posted Fri January 21, 2022 06:16 AM

    Dear team,

    I am having problems with the httpd daemon, because the "apache" user can not be created.

    The installation script has following to check if the user apache is available and if not create it:

    # add the "apache" user only if it does not yet exist
    result=`/usr/sbin/lsuser apache | /usr/bin/awk '{ print $1 }' 2>/dev/null`
    if [[ "${result}" != "apache" ]] ; then
    /usr/bin/mkuser id=64500 pgrp='apache' gecos='Apache User' \
    login='false' rlogin='false' apache 2> /dev/null || :
    fi

    The standard for the mkuser command is to create the users home directory in /home.
    Unfortunately in our environment the /home directory is a NAS device and root user has no write access, so the user could not be created.

    Maybe it would be possible to add the option "home=/opt/freeware/etc/httpd" to the mkuser command in future versions to prevent this...???

    Many thanks in advance for for support.

    best regards,
    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------

    #AIXOpenSource


  • 2.  RE: problems with new installations of httpd

    Posted Mon January 24, 2022 04:42 AM
    Hi Joerg,
    This may be difficult as we will have to change what package provide and we try to stick to what open source packages does.
    Meanwhile how this works on Linux environment, do you know ?

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 3.  RE: problems with new installations of httpd

    Posted Mon January 24, 2022 09:30 AM
    Hello Sanket,

    in Linux I know that it is possible to create a user without creating a home directory. This seems not possible in AIX.
    But, I don't know anything about the httpd installation process in Lunix...

    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 4.  RE: problems with new installations of httpd

    Posted Tue January 25, 2022 12:30 AM
    In AIX also it is possible with useradd command but I am not sure if this is possible here.
    Will have to look deeply the side effect of that. We can not commit anything right now.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 5.  RE: problems with new installations of httpd

    Posted Tue January 25, 2022 01:45 AM
    Hello Sanket,

    maybe its our environment then, but also with useradd the system tries to create a home directory even if I didn't set the "-m" flag.

    :/root#useradd test1
    mkdir: cannot access directory /home.
    /home: Permission denied
    chown: /home/test1: No such file or directory
    chmod: /home/test1: No such file or directory
    chgrp: /home/test1: No such file or directory
    chown: /home/test1: No such file or directory
    cp: /home/test1/.profile: No such file or directory
    chmod: /home/test1/.profile: No such file or directory
    chgrp: /home/test1/.profile: No such file or directory
    chown: /home/test1/.profile: No such file or directory
    Could not create user.



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 6.  RE: problems with new installations of httpd

    Posted Wed January 26, 2022 10:16 AM
    Yes looks like problem in your environment. I am able to create user without home dir using useradd command.
    You may want to try on other AIX test server.

    ------------------------------
    SANKET RATHI
    ------------------------------