ruid2 / Plesk configuration questions (SOLVED!)

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
ASN5
New Forum User
New Forum User
Posts: 1
Joined: Sun Apr 29, 2012 9:24 am
Location: Colorado US

ruid2 / Plesk configuration questions (SOLVED!)

Unread post by ASN5 »

== SOLVED! ==
As it turns out, the reason ruid2 was working on some websites and not others was permissions - some of the directories were owned by apache, which apparently confuses ruid2. Once I ran chown -R username:psaserv to reset all website permissions all was well. So... if you are wondering how to get ruid2 running on a system similar to mine, the instructions are below :


My system is as follows:

CPU: GenuineIntel, Intel(R) Xeon(R) CPU E31220 @ 3.10GHz
Operating System: CentOS release 6.2 (Final) (Linux 2.6.32-220.7.1.el6.x86_64)
Plesk Version: Parallels Plesk Panel v10.4.4_build1013111102.18 os_CentOS 6
Apache Version: Apache/2.2.15 (Unix)
ruid2 package installed: mod_ruid2-0.9.6-3.el6.art.x86_64

Now to Install

(1) As 'root' cd to /root

(2) Download the latest atomic-release rpm from http://www6.atomicorp.com/channels/atom ... 6_64/RPMS/

(3) Install atomic-release rpm: # rpm -Uvh atomic-release*rpm

(4) Install mod_ruid2 rpm package: # yum install mod_ruid2

This will result in these files on your OS:

(1) /etc/httpd/conf.d/ruid2.conf
(2) /usr/lib64/httpd/modules/mod_ruid2.so
(3) /usr/share/doc/mod_ruid2-0.9.1/
(4) /usr/share/doc/mod_ruid2-0.9.1/LICENSE
(5) /usr/share/doc/mod_ruid2-0.9.1/README


After you instal mod_ruid2-0.9.6-3.el6.art.x86_64 (or current version) run the command apachectl -t -D DUMP_MODULES

Look for something like this to result:

Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
auth_basic_module (shared)
auth_digest_module (shared)
authn_file_module (shared)
authn_alias_module (shared)
authn_anon_module (shared)
authn_dbm_module (shared)
authn_default_module (shared)
authz_host_module (shared)
authz_user_module (shared)
authz_owner_module (shared)
authz_groupfile_module (shared)
authz_dbm_module (shared)
authz_default_module (shared)
ldap_module (shared)
authnz_ldap_module (shared)
include_module (shared)
log_config_module (shared)
logio_module (shared)
env_module (shared)
ext_filter_module (shared)
mime_magic_module (shared)
expires_module (shared)
deflate_module (shared)
headers_module (shared)
usertrack_module (shared)
setenvif_module (shared)
mime_module (shared)
dav_module (shared)
status_module (shared)
autoindex_module (shared)
info_module (shared)
dav_fs_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
actions_module (shared)
speling_module (shared)
userdir_module (shared)
alias_module (shared)
substitute_module (shared)
rewrite_module (shared)
proxy_module (shared)
proxy_balancer_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_ajp_module (shared)
proxy_connect_module (shared)
cache_module (shared)
suexec_module (shared)
disk_cache_module (shared)
cgi_module (shared)
version_module (shared)
fcgid_module (shared)
perl_module (shared)
php5_module (shared)
python_module (shared)
ruid2_module (shared)
ssl_module (shared)

If it's there, you're good to go

Next, make the required additions to the ruid2.conf file.

Note that since Plesk set my master account up using the /var/www/vhosts/mydomain.com/httpdocs path, I added this first:

<Directory /var/www/vhosts/mydomain.com/httpdocs>
RMode stat
RUidGid apache apache
RGroups apache psaserv
</Directory>

Then, it set up additional domain websites using the /var/www/vhosts/mydomain.com/myotherdomain.com path, so I added this for each of those:

<Directory /var/www/vhosts/mydomain.com/myotherdomain.com>
RMode stat
RUidGid apache apache
RGroups apache psaserv
</Directory>

Hope this helps someone. (Definitely wish I had found something similar.)

Good luck!
tkalfaoglu2
Forum User
Forum User
Posts: 12
Joined: Mon Nov 14, 2011 8:06 am
Location: turkey

Re: ruid2 / Plesk configuration questions (SOLVED!)

Unread post by tkalfaoglu2 »

Looks great, but does it work with Centos6 + PLESK 10.4 ?
Thanks -t
tkalfaoglu2
Forum User
Forum User
Posts: 12
Joined: Mon Nov 14, 2011 8:06 am
Location: turkey

Re: ruid2 / Plesk configuration questions (SOLVED!)

Unread post by tkalfaoglu2 »

Does anyone know how this works, I assume it does not have a shared copy of php, so would this increase the memory footprint of a large shared system?
ikkk
Forum User
Forum User
Posts: 47
Joined: Wed Jan 05, 2011 3:09 pm

Re: ruid2 / Plesk configuration questions (SOLVED!)

Unread post by ikkk »

it uses mod_php still - it just alters the apache process that calls mod_php to be ran as "user" instead of "apache" we use this on lots of servers plesk and non plesk so i dont see why plesk should have any issues with it.

one thing to take note of though is you delete a vhost from plesk make sure you remove its entries from your ruid2.conf file otherwise apache will not restart due to user not found.

you can use the plesk event manager to do things like this. or it is possible to auto create a crude ruid2-vhosts.conf file directly from /etc/passwd if you want it on all domains, and then you could trigger that to happen on any service httpd XXX command by putting it into /etc/sysconfig/httpd.
Post Reply