apache user

Discussion in 'Installation/Configuration' started by rbartz, Apr 27, 2006.

  1. rbartz

    rbartz Member HowtoForge Supporter

    I hope I am not asking something already covered, but I couldn't find much about this.

    Fedorea core 3, apache 2.0.53

    httpd runs under user apache group apache

    When I use PHP programs to create directories or files they are owned by apache.apache. Later I can't write to those directories.

    An exapmle, I create a directory in an images file, it is owned by apache.apache. When I try to write a file to that directory with the same program, it won't go until I chown that directory to the web owner.web group.

    suExec is off, my webs are created in /home/www

    What do I need to do to change this behavior so that the PHP programs create directories and files owned by the web user.web group?


  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. rbartz

    rbartz Member HowtoForge Supporter

    Thank you Till.

    It looks like suExec is my solution as all the scripts we would want to run are uploaded with FTP and owned by each site user and group.

    Will it work simply by turning it "on" with the checkbox in ispConfig? I read somwehere that the webs would have to be in /var/www for suExec to work, but we already have live sites in /home/www. If so, can this be worked around by recompiling suExec to use /home/www instead of /var/www? What should be the USERDIR suffix, if any?

    Would this affect later ispConfig updates or apg-get updates?

    Thanks again!

    # /usr/sbin/suexec -V
    -D AP_DOC_ROOT="/var/www"
    -D AP_GID_MIN=100
    -D AP_HTTPD_USER="apache"
    -D AP_LOG_EXEC="/var/log/httpd/suexec.log"
    -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
    -D AP_UID_MIN=500
    -D AP_USERDIR_SUFFIX="public_html"
  4. falko

    falko Super Moderator Howtoforge Staff

    Yes, you must recompile suExec.

    It does not affect ISPConfig updates, but might cause problems if suExec is to be updated...
  5. rbartz

    rbartz Member HowtoForge Supporter

    Thank you Falko and Till, you guys are great!

Share This Page