All PHP uploaded files are 777 permissions

Discussion in 'Installation/Configuration' started by dabro, Sep 10, 2007.

  1. dabro

    dabro New Member

    All Apache-PHP uploaded files are 777 permissions

    I must be overlooking something. I used the guide http://www.howtoforge.com/suphp_debian_etch_ispconfig
    to install suPHP on my Debian box. I got suphp to work but now anything created by Apache, directories and files, permissions are set to 777. It doesn't seem to respect the php.conf file settings on the "umask=0022". I even tried using the PHP module putting this in the ISPConfig virtual directory config:
    "suPHP_Engine off RemoveHandler .php php_admin_flag engine on".
    This works also and the regular Apache user uploads and creates files on the server. However, the permissions are still set to 777 on anything that is created. It's driving me nuts, any help would be greatly appreciated! Thanks, Dave
    (edited)
     
    Last edited: Sep 11, 2007
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If you installed SuPHP, no files or directories are created by the apache user. All files and directory are created by the administrator user of the website.

    You can not use any php_admin_flag or php_admin_value commands with SuPHP as SuPHP uses cgi-php and not mod-php. Make sure that you do changes in the php.ini file for cgi-php and not for mod_php.
     
  3. dabro

    dabro New Member

    Resolved the problem, mostly, my fault!

    Thanks Till for the reply. I found what I was overlooking somewhat. I was testing the server-php scripts using FCK-Editor on my Drupal sites. The FCK-editor was setting the permissions to 777. I had never noticed that before, but I had never particularly paid attention to the permissions set until I was testing suPHP. So I found that problem, my bad. I'll track that down on the FCKEditor side.
    SuPHP is working (outside FCK-Editor), folders are created and files uploaded with the admin ownership. Folders are created 775 and files are created 644 which is correct. I still have a question about the "suphp.conf" file located in /etc. This should be the configuration file for the suPHP compiled in the howto, the file contains a setting for "umask". I can change the settings there and restart Apache but the settings have no effect. Shouldn't these settings affect the operation of the module? Thanks for the great work and support! It's got to be frustrating working with us simpleminded folks, Dave
     

Share This Page