update php 5.3 with mod_ruid2 loaded but file upload still be apache user

warut21

New member
Joined
Jul 8, 2015
Messages
2
Dear All,

I currently run php5.3 mode mod_php with mod_ruid2 and owner of file upload by php is directadmin user. Today i try to update php5.3 to php5.5 with mode php-fpm but not working so I deside to fall back. After ./build apache d and ./build php d again with php5.3 mod_php mod_ruid2=yes my website working again but now owner of file upload to server is apache so I have directory permission problem.

I already check that mod_ruid2 is load but do not know why file permission not be directadmin user like before.

./build version
2.0.0 (rev: 1401)

./directadmin o
Compiled on 'CentOS 6.0 64-Bit'
Compile time: Jun 27 2015 at 02:06:02
Compiled with IPv6

more /etc/redhat-release
CentOS release 6.6 (Final)

============ options.conf ============
#PHP Settings
php1_release=5.3
php1_mode=mod_php
php2_release=no
php2_mode=php-fpm
opcache=yes
htscanner=no
php_ini=no
php_timezone=Asia/Bangkok
php_ini_type=production
ioncube=yes
zend=no
suhosin=no
x_mail_header=yes

#WEB Server Settings
webserver=apache
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=comodo
apache_ver=2.4
apache_mpm=auto
mod_ruid2=yes
harden_symlinks_patch=yes
use_hostname_for_alias=no
======================================


====== /usr/local/directadmin/data/users/<username>/httpd.conf ===========

<Directory "/home/<username>/public_html">
<IfModule mod_ruid2.c>
RMode config
RUidGid <username> <username>
#RGroups apache access
RGroups @none
</IfModule>
<IfModule mod_fcgid.c>
SuexecUserGroup <username> <username>
</IfModule>
</Directory>

<VirtualHost <ip>:80 >
ServerName <domain>
ServerAlias <domain> <domain>
ServerAdmin webmaster@<domain>
DocumentRoot /home/<username>/domains/<domain>/public_html
ScriptAlias /cgi-bin/ /home/<username>/domains/<domain>/public_html/cgi-bin/
UseCanonicalName OFF
SuexecUserGroup <username> <username>
CustomLog /var/log/httpd/domains/<domain>.bytes bytes
CustomLog /var/log/httpd/domains/<domain>.log combined
ErrorLog /var/log/httpd/domains/<domain>.error.log
<Directory /home/<username>/domains/<domain>/public_html>
Options +Includes -Indexes
php_admin_flag engine ON
<IfModule !mod_php6.c>
php_admin_flag safe_mode OFF
</IfModule>
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f <username>@<domain>'
php_admin_value open_basedir /home/<username>/:/tmp:/var/tmp:/usr/local/lib/php/
</Directory>
</VirtualHost>
<VirtualHost <ip>:80>
ServerName cp.<domain>
ProxyRequests Off
ProxyPass / http://<ip>:2222/
ProxyPassReverse / http://<ip>:2222/
</VirtualHost>
<VirtualHost <ip>:80>
ServerName webmail.<domain>
ServerAdmin webmaster@<domain>
DocumentRoot /var/www/html/webmail
CustomLog /var/log/httpd/domains/<domain>.bytes bytes
CustomLog /var/log/httpd/domains/<domain>.log combined
ErrorLog /var/log/httpd/domains/<domain>.error.log
</VirtualHost>

<VirtualHost <ip>:443 >
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCACertificateFile /etc/httpd/conf/ssl.crt/server.ca
ServerName <domain>
ServerAlias <domain> <domain>
ServerAdmin webmaster@<domain>
DocumentRoot /home/<username>/domains/<domain>/private_html
ScriptAlias /cgi-bin/ /home/<username>/domains/<domain>/public_html/cgi-bin/
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup <username> <username>
</IfModule>
<IfModule mod_ruid2.c>
RMode config
RUidGid <username> <username>
#RGroups apache access
RGroups @none
</IfModule>
CustomLog /var/log/httpd/domains/<domain>.bytes bytes
CustomLog /var/log/httpd/domains/<domain>.log combined
ErrorLog /var/log/httpd/domains/<domain>.error.log
<Directory /home/<username>/domains/<domain>/private_html>
php_admin_flag engine ON
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f <username>@<domain>'
php_admin_value mail.log /home/<username>/.php/php-mail.log
php_admin_value open_basedir /home/<username>/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php53/lib/ph
p/
</Directory>
</VirtualHost>
=============================================


Try to search the forum but not found the solution.
 
working now after remove file in /usr/local/directadmin/data/templates/custom/ and ./build rewrite_confs :)
 
Back
Top