[HOWTO] mod_ruid2

I've updated the article on http://wiki.amservers.nl/Mod_ruid2, I changed the 711 to 755 and placed 2 links to this template issue.

But this wiki was only meant temporarily, maybe if Jeff or perhaps someone else still has plans to create a DA wiki it could be placed there and others could contribute to it as well.
 
It's still not working for me, what i did is:

Code:
cd /usr/local/directadmin/data/templates
cp virtual_host2*.conf custom
cd custom

After that; i removed the if statements in all 4 files. Restarted Apache and Directadmin (for sure) but still can't write files without chmodding. Can anyone help me?

Edit: I used this how-to months ago http://forum.directadmin.com/showthread.php?t=37467
 
But this wiki was only meant temporarily
Yep I know. However I'm always using it because it's great and working perfectly.
Maybe in the future with CB 2.0 we don't need it anymore due to the mod_ruid setting in options.conf
However, there are also people around who might want to stay with the manual installation for customization reasons.

So if you're planning to take it offline someday, please let me know, I will make a copy of it just to be sure.:)
 
It's still not working for me, what i did is:

Code:
cd /usr/local/directadmin/data/templates
cp virtual_host2*.conf custom
cd custom

After that; i removed the if statements in all 4 files. Restarted Apache and Directadmin (for sure) but still can't write files without chmodding. Can anyone help me?

Edit: I used this how-to months ago http://forum.directadmin.com/showthread.php?t=37467

Well i didnt copy out hosts* to custom. Why are people suggesting this?
 
@Pucky: Please read back. It's explained before. It's due to a bug in DA 1.43 with custombuild 1.2. You are running CB 2.0 so it should not be important to you unless you are running 1.2 on other servers.

@SEO Guru: Did you delete both lines in virtual_host2.conf?
So not only this line:
Code:
|*if HAVE_RUID2="1"|
but also this line:
Code:
       |*endif|
which is just below the </Ifmodule> statement.
 
It is currently needed for those who are usign Custombuild 1.2 and DA 1.43.

Still not working :( how sad.

Try looking in /usr/local/directadmin/data/users/admin/httpd.conf and search for RUidGid admin admin

Also look in /etc/httpd/conf/httpd.conf and see if

LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so

Is still in there.
 
It is currently needed for those who are usign Custombuild 1.2 and DA 1.43.



Try looking in /usr/local/directadmin/data/users/admin/httpd.conf and search for RUidGid admin admin

Also look in /etc/httpd/conf/httpd.conf and see if



Is still in there.

Admin httpd.conf is fine.

In /etc/httpd/conf/httpd.conf i have the following
User apache
Group apache
 
Last edited:
You might want to add the lines, it should look like this:
Code:
LoadModule ruid2_module       /usr/lib/apache/mod_ruid2.so

User apache
Group apache

# Mod_ruid
RMode config
RUidGid apache access
 
It is possible that that echo rewrite line replaced your httpd.conf, you could copy the httpd.conf from

/usr/local/directadmin/custombuild/configure/ap2/conf/httpd.conf
to
/usr/local/directadmin/custombuild/custom/ap2/conf/httpd.conf

And make the ruid changes there as well in case a rewrite happens again.
 
You might want to add the lines, it should look like this:
Code:
LoadModule ruid2_module       /usr/lib/apache/mod_ruid2.so

User apache
Group apache

# Mod_ruid
RMode config
RUidGid apache access

I added the last 2 lines but that didn't help :(

@Arieh, The ruid changes are fine in user httpd config files. It only doesn't work for new users, however the new templates are fine.. Very strange..

Code:
                <IfModule !mod_ruid2.c>
                        SuexecUserGroup auto auto
                </IfModule>

                <IfModule mod_ruid2.c>
                        RMode config
                        RUidGid auto auto
                        RGroups apache access
                </IfModule>

Note: auto is a legit user.
 
Last edited:
Arieh can I contact you via e-mail or something else (I am Dutch too btw)? Everything looks ok but doesn't work.. I tried everything suggested in this topic.
 
Thanks for your help! We solved the issue... Guess what? I was browsing to <ip>/~user :rolleyes:
 
Last edited:
So, what's the bottom line now? If i convert a CB1.x system to CB2, and use settings for mod_ruid2 to be installed through CB, will all my sites, old and new now work (presuming latest CB2)?

If I install a new server with latest DirectAdmin now, will all sites on the sever, both new, and moved to the server from old systems, now work as they should?

A one or two line recap here would be nice :).

Thanks.

Jeff
 
Hi Jeff,

yes, they will, but, you will need to do a little thing more, change all folder/file permissions or this will not work as it should.

Setting folder to 755 and files to 644 (two easy commands from post #1) will let everything work as it should.

Regarding the new site, yes, they will directly work, old site, if they have 777 files and/or folder, they should produce errors cause mod_ruid2 will prevent to get loaded.

Hope ive been clear, if not, feel free also to contact me via e-mail or msn/skype for eventually live assistance.

Regards
 
Back
Top