cPanel on LXC - where do I perform required changes?

karateka

New Member
Nov 3, 2015
3
0
1
Hello,

I have installed cPanel on Proxmox 4.1 (Jessie) with a Centos 7 lxc.

However, some services are marked as failed in the system monitor, when they are actually up.
So whilst troubleshooting this, I came across the following regarding required changes to Centos 7:
documentation.cpanel.net/pages/viewpage.action?pageId=14550793


I added the following lines to /etc/pve/lxc/VMID.conf
Code:
lxc.include = /usr/share/lxc/config/fedora.common.conf
lxc.aa_profile = unconfined
lxc.cap.drop = setpcap
lxc.cap.drop = setfcap

However, it doesn't seem to make a difference, so I am wondering:
Where is the proper place to add the required lines?
Am I using the proper syntax?
What am I missing to get cPanel's instructions to work with Proxmox 4.1?
 
I'd also like some clarity on this.

Did you possibly come right with this? Going to do some testing myself but migrated a test VPS from openvz proxmox 3.4 to 4.1 lxc and same issue.
 
This thread is a bit old, but here's how to get cPanel working in a linux container on Proxmox 4.1:

First, only use a CentOS 6 container. Follow the instructions at https://documentation.cpanel.net/display/1152Docs/Linux+Containers+and+cPanel. I can get cPanel up and running with no problems There are, however (at least) two issues which I have come upon. First, the MySQL socket (/var/lib/mysql/mysql.sock) is created with insufficient privileges (755, and it requires 777), causing MySQL based sites to throw a "can't connect to database" error. Similarly, Dovecot does not function because the files in /var/run/dovecot/login/ are also created with insufficient privileges. Mail cannot be retrieved by remote email clients and webmail clients won't load.

Both problems can be corrected by changing the ACL in those two directories as follows:

# yum install -y acl

# cd /var/lib/mysql

# setfacl -d -m g::rwx .

# setfacl -d -m o::rwx .

# service mysql restart

# cd /var/run/dovecot/login

# setfacl -d -m g::rwx .

# setfacl -d -m o::rwx .

# service dovecot restart

As of now (less than 24 hours) things appear to be running smoothly. I haven't tested mail relay or FTP yet.
 
  • Like
Reactions: Sergiio
Hi, thanks for your help, thank you for sharing more news on this, I thank you, now I'm running cpanel in kvm, but with very high CPU consumption.
 
Further investigation has shown that I also needed to change the ACL on /var/run/dovecot as /var/run/dovecot/auth-client (which is used for Exim authentication) needed 666 permissions and had 644. Without doing that we couldn't relay mail from remote desktop email clients.
 
This thread is a bit old, but here's how to get cPanel working in a linux container on Proxmox 4.1:

First, only use a CentOS 6 container. Follow the instructions at https://documentation.cpanel.net/display/1152Docs/Linux+Containers+and+cPanel. I can get cPanel up and running with no problems There are, however (at least) two issues which I have come upon. First, the MySQL socket (/var/lib/mysql/mysql.sock) is created with insufficient privileges (755, and it requires 777), causing MySQL based sites to throw a "can't connect to database" error. Similarly, Dovecot does not function because the files in /var/run/dovecot/login/ are also created with insufficient privileges. Mail cannot be retrieved by remote email clients and webmail clients won't load.

Both problems can be corrected by changing the ACL in those two directories as follows:

# yum install -y acl

# cd /var/lib/mysql

# setfacl -d -m g::rwx .

# setfacl -d -m o::rwx .

# service mysql restart

# cd /var/run/dovecot/login

# setfacl -d -m g::rwx .

# setfacl -d -m o::rwx .

# service dovecot restart

As of now (less than 24 hours) things appear to be running smoothly. I haven't tested mail relay or FTP yet.
I followed your steps, it has solved all but exim below in red.
 
I followed your steps, it has solved all but exim below in red.
Did you also follow the steps on the /var/run/dovecot directory as outlined in post #6 above? That should correct the problems with Exim.

If not, please restart Exim and post the output of "ls -l /var/run/dovecot | grep auth-client".
 
Last edited:
  • Like
Reactions: Sergiio
Did you also follow the steps on the /var/run/dovecot directory as outlined in post #6 above? That should correct the problems with Exim.

If not, please restart Exim and post the output of "ls -l /var/run/dovecot as /var/run/dovecot/ | grep auth-client".
Already works, it has taken some time, thank you very much.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!