[HOWTO] mod_ruid2

Hello,

Some days ago, I've faced an issue with CentOS 6.1 and mod_ruid2, and the guide did not work for me properly. For now I'm still not sure, what was the reason, but I managed to make it work only with such a config:

Code:
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid |USER| |GROUP|
            RGroups apache access
        </IfModule>

but not with

Code:
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid |USER| |GROUP|
            RGroups apache
        </IfModule>

Andrea, could you please check it on your side, and confirm or discard the solution? I've noticed that Apache group and user had guid and uid about 500 or so. Though I did not find any points that the high guid and uid might affect the usage of mod_ruid2. So I'm confused a little bit, why group apache (being included into group access) did not have permissions to access homedirs.
 
Where did you add this? In httpd.conf of apache or in the virtual_host2 template?

Ill install a CentOS 6.2 box in few time for test if da work with that and ill add mod_ruid2 on it.

Regards
 
Nice ive never thot to use an if for mod_ruid2 inside the template.

Actually my template look like:

Code:
        #SuexecUserGroup |USER| |GROUP|
        RMode config
        RUidGid |USER| |GROUP|
        RGroups apache

Should i ask you how did you set suexec with this if?

Thanks
Im installing 6.2 right now and ill let you know asap.
 
Here is it:

Code:
        <IfModule mod_ruid2.c>
            RMode config
            RUidGid |USER| |GROUP|
            RGroups apache access
        </IfModule>
        <IfModule !mod_ruid2.c>
                SuexecUserGroup |USER| |GROUP|
        </IfModule>
 
Just tested and seems to work to me with apache (not access) in configuration of virtual_host2 with centos 6.2

Had you notice this error right after centos update?

What group have apache in /etc/httpd/conf/httpd.conf?
 
It was a fresh installed CentOS 6.x

In /etc/httpd/conf/httpd.conf there was group apache, and when changing it to access, it gave me error forbidden or 500.
 
Ok, so yes if you change the group in httpd.conf the same must be changed in virtual_host2*.conf

I had noticed that and wrote something about that time ago in this forum.

Now, im curios, is necessary to change the apache group to access in httpd.conf? Cause, if yes, should be done automatically by custombuild once access group is on.

Why did you changed that?

Regards
 
I was searching for a solution, that's why I changed it from apache to access, and then from access to apache. I searched the forums, but I could not find your explanations on the subject of necessity to change group in httpd.conf to access. I was short of time in order to sort out the things, once I've managed to make it to work, I've left with the config, I've posted above.

I have no idea what was wrong, as I did it several times (before) following the guide, and everything worked ok. It was the first time, when I faced the issue. So I guess I need to set up a test box for making investigations.
 
Ok, im unable to find that post too.. that's courios... da staff solved that issue long time ago for me cause i had missed to put the rmode in all virtual_host2 confs (i did just for main domain not for subs).

What is in httpd.conf as group now? if you wanna do some test you should use my vm with centos 6.2 if you want.

Let me know by pm if you need it.

Regards
 
It was left working with
Code:
User apache
Group apache

Andrea, thanks for your suggestion. I want to re-produce the issue, and if you say, that it's working OK at your side... I'll update you with results, as soon as I finish, and then I'll see if I need your VM.
 
CustomBuild 2.0 RC1 is ready and should be uploaded to DA servers this week. It includes mod_ruid2 support (mod_ruid2=yes/no in the options.conf file). However, the system will need to run DA 1.40.2 (or pre-release binaries) for it to work, because mod_ruid2 needs modified templates.
 
Would mod_ruid2 work with both PHP5.2 & PHP5.3 on the same DA installation?
has any1 tried this...?
 
Would mod_ruid2 work with both PHP5.2 & PHP5.3 on the same DA installation?
has any1 tried this...?

No, it wouldn't. Unless you need an additional instance of PHP for 1 user only.
 
Back
Top