Arieh
Verified User
LocNguyen had contacted me and it's resolved now, he also was trying to access it through ip/~user. Although it says so in the wiki, I know also have placed it again under the test script so people won't miss it that easy.
I am about to install a new server. I want to use custombuild 2.0 and php cli with mod_ruid2.
Question: In custombuild 2.0, does custombuild do all the needed configuration of mod_ruid2 when I do ./build mod_ruid2?
Or does I need to manually configure settings in mod_ruid2 myself?
Please note, I only want to run ONE version of php, it will be php 5.4.
|*if HAVE_RUID2="1"|
<IfModule mod_ruid2.c>
RMode config
RUidGid |USER| |GROUP|
RGroups apache |SECURE_ACCESS_GROUP|
</IfModule>
|*endif|
<IfModule mod_ruid2.c>
RMode config
RUidGid |USER| |GROUP|
RGroups apache |SECURE_ACCESS_GROUP|
</IfModule>
Hello everyone,
Since there are alot of people asking for it, here is my HowTo about mod_ruid2
This is based on my CentOS server with Apache 2.x.
Installing this module its no longer needed to chmod config files to 666 or upload/attachments directories to 777. Since with this module enabled everything @ HTTP will run under the user itself and not 'apache' anymore.
** If you are using mod_ruid instead of mod_ruid2, first of all remove the mod_ruid line from '/etc/httpd/conf/httpd.conf'
First, we are going to install libcap-develAfter this is done we are going to download and install mod_ruid2Now, if you didn't get any errors mod_ruid2 should be installed and added to the '/etc/httpd/conf/httpd.conf'.
Lets confirm mod_ruid2 is addedIf you get any response like below its installed
Now we need to modify the DA httpd.conf templates a little bit to enable mod_ruid2 for the users
Now copy the template files to customNow you have copied the original templates to the 'custom' directory, so they won't be overwritten.
Code:cd /usr/local/directadmin/data/templates/custom/
Now follow the steps below for each virtual_host2 file you've copiedSave the files and lets rewrite the HTTPd config filesIf you want you can start the rewrite of the HTTPd config files manually, just paste the line below and wait when its doneAfter the rewrite is complete you can restart HTTPd with the command belowNow mod_ruid2 should be installed and you don't need to chmod anymore like 'chmod 666 config.php' or 'chmod 777 uploads'.
To be sure the webmail clients etc still works we need to change the owner permissions
Edit by NoBaloney; see posts 324 and 325, page 17 of this thread:
And last you need to modify httpd-directories.conf
Add the RUidGid line below between the <Directory "/var/www/html"> and </Directory>Code:nano -w /etc/httpd/conf/extra/httpd-directories.conf
* Thanks to Arieh for this change.Code:<Directory "/var/www/html"> Options -Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all <IfModule mod_suphp.c> suPHP_Engine On suPHP_UserGroup webapps webapps SetEnv PHP_INI_SCAN_DIR </IfModule> RUidGid webapps webapps </Directory>
End edit by NoBaloney
** Questions with Answers **
-------------------------------------------------------
Q: How can I test this is working?
A: Easy, install some CMS that you are used before. Like Wordpress, Joomla that required (before!!) chmod 666 or 777 to get install/working.
Q: I've dirs/files owned by apache for some users, must I change this?
A: Yes, you need to give the dirs/files owner of the user itself, not apache anymore. Check below
Thanks for snk for the commands below, to fix the owner permissions of the dirs/files* Added '&&' so if they do a typo, it won't change anything.
You are missing a question, or you have a question, please let me know and I'll try to answer them for you!![]()
mod_ruid2 is now part of Custombuild 2.0, the templates should be ok with the default (if you have latest Directadmin) and no edits would be needed.
So if you're using Cb 1.2 (or older) you should consider switch to CB 2.0 unless you are still using PHP 5.2 that is deprecated
Regards
Well... CB 2.0 could be a bit more stable before changing to it imho.
If you're still on CB 1.2 (which also has php 5.3), you can follow this guide, which is up2date:
http://wiki.amservers.nl/Mod_ruid2
Well, in options.conf you can see what version are you using.
Also, you are using PHP 5.2, so you are using for sure 1.x
And is not up2date, All software are not up2date from what you listed.
Regards
You need to manually updated all those packages, those are not updated when you update directadmin cause different system administrator may want to config/use different versions/release
For update those packages you need to do that via ssh in /usr/local/directadmin/custombuild
If you have no experience with that, or with ssh, i highly suggest to hire a system administrator for do that for you.
Me, Zeiter, NoBaloney and other use does offer those kind of service, feel free in case to pm which one you would prefer for a quote.
Regards
Well, in options.conf you can see what version are you using.
Also, you are using PHP 5.2, so you are using for sure 1.x
And is not up2date, All software are not up2date from what you listed.
Regards
Yes it will. For CB 1.1 and 1.2 the template edit is needed until DA 1.43.1 is released.just the edit on template will not be needed.
Yes it will. For CB 1.1 and 1.2 the template edit is needed until DA 1.43.1 is released.
|*if HAVE_RUID2="1"|
<IfModule mod_ruid2.c>
RMode config
RUidGid |USER| |GROUP|
RGroups apache |SECURE_ACCESS_GROUP|
</IfModule>