Well-Known Member
Sep 26, 2006
cPanel Access Level
Root Administrator
I have several accounts on my server that belong to me. I'm running WHM / cPanel v. 76.0.20 on a CentOS 6.10 xen hvm machine, and Perl v. 5.10.1.

(I know, I need to upgrade, but it's a huge pain so I'm procrastinating).

In 2014, I set up a lot of my smaller sites to use Perl .lib files on my main account, so that I wouldn't have to duplicate everything. To do so, I set up a symlink on the smaller account to the main account; eg,

ln -s /home/main_account/public_html/cgi-bin/libs/ /home/new_account/public_html/
On the main account, the permissions to those libraries are:


Owner / Group
main_account / main_account

And on the smaller account, the permissions for the symlink are:


Owner / Group
root / root

Somewhere along the way, though, the scripts on the smaller sites started to throw an error:

Can't locate /home/new_account/www/cgi-bin/libs/example.lib in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at libs/variables.lib line 24.
(where variables.lib exists at /home/new_account/cgi-bin/libs/, and line 24 is "require '/home/new_account/www/cgi-bin/libs/example.lib';")

I have no idea when this started; those smaller sites are so small that I never pay them any attention, but someone just reported the error a few days ago. So it could have been recent, or it might have started 5 years ago.

Can you guys suggest how I can make these symlinks work the way they used to?


Staff member
Apr 11, 2011
Hello @GoWilkes,

Using symbolic links in the method you described should be avoided if possible. I recommend using Git if you need to duplicate/sync a master set of files to multiple accounts. We provide a guide on using Git and the "Git Version Control" feature at:

Guide to Git - cPanel Knowledge Base - cPanel Documentation

Is this a solution you are open to exploring? If so, feel free to let me know if you have any questions or concerns. I'm happy to help guide you through the setup process.

Thank you.