Please keep in mind that this should be considered a last resort to get things going. The long-term goal should be to provision a new server with an appropriate disk partitioning scheme and migrate.Would you please post the steps to the solution that Chris provided for you?
Here's the steps that I provided, slightly modified for further clarification:
Moving /usr/local/cpanel to another location
1) Ensure that there are no "immutable" files under /usr/local/cpanel that will cause the directory move to fail. The cPanel software does not require or use immutable file attributes:
Code:
chattr -f -R -i -a /usr/local/cpanel
3) Shut down all WHM/cPanel services and the cron service. We do not want any services to automatically start that may open a file under /usr/local/cpanel:
Code:
service cpanel stop
service crond stop
service exim stop
service httpd stop
killall leechprotect
Code:
lsof | grep /usr/local/cpanel
5) Create the new base path where you're going to move the cpanel directory:
Code:
mkdir -p /home/usr/local
Code:
lsof | grep /usr/local/cpanel
mv /usr/local/cpanel /home/usr/local/cpanel
8) Create an empty /usr/local/cpanel directory with correct permissions:
Code:
mkdir /usr/local/cpanel
chmod 711 /usr/local/cpanel
Code:
cp /etc/fstab /etc/fstab.bak
echo "/home/usr/local/cpanel /usr/local/cpanel none rw,bind 0 0" >> /etc/fstab
Code:
/home/usr/local/cpanel /usr/local/cpanel none rw,bind 0 0
Code:
mount /usr/local/cpanel
ls /usr/local/cpanel
That's it. Continue to reference "/usr/local/cpanel" in any custom code you may write (pretend "/home/usr/local/cpanel" doesn't exist). The use of a bind-mount rather than a symlink should ensure that everything works as if the files were located under the original path.
Last edited by a moderator: