26 Aug

Fixing File and Directory Permissions for cPanel Users with a Bash Script

Managing file and directory permissions on a cPanel server is crucial for both security and functionality. Incorrect permissions can expose sensitive data or cause website errors. This guide shows you how to use a Bash script to quickly fix permissions for cPanel users.

Why Are Permissions Important?

In Linux systems, permissions determine who can read, write, or execute files and directories. The most common permission settings are:

  • Directories: 755 – Owner has full control; others can read and execute.
  • Files: 644 – Owner can read and write; others can only read.

These settings protect your files while allowing websites to function correctly.

Bash Script to Fix Permissions

Here’s a simple Bash script to adjust permissions for a specific cPanel user:

#!/bin/bash
# Script to fix permissions for a cPanel user

if [ "$#" -lt "1" ]; then
echo "Must specify user"
exit
fi

USER=$@

for user in $USER; do
HOMEDIR=$(egrep "^${user}:" /etc/passwd | cut -d: -f6)

if [ ! -f /var/cpanel/users/$user ]; then
echo "$user user file missing, likely an invalid user"
elif [ "$HOMEDIR" == "" ]; then
echo "Couldn't determine home directory for $user"
else
echo "Setting ownership and permissions for user $user"
chown -R $user:$user $HOMEDIR
chmod 711 $HOMEDIR
chown $user:nobody $HOMEDIR/public_html $HOMEDIR/.htpasswds
chown $user:mail $HOMEDIR/etc $HOMEDIR/etc/*/shadow $HOMEDIR/etc/*/passwd

find $HOMEDIR -type f -exec chmod 644 {} \; -print
find $HOMEDIR -type d -exec chmod 755 {} \; -print
find $HOMEDIR -type d -name cgi-bin -exec chmod 755 {} \; -print
find $HOMEDIR -type f \( -name "*.pl" -o -name "*.perl" \) -exec chmod 755 {} \; -print
fi
done

chmod 750 $HOMEDIR/public_html

if [ -d "$HOMEDIR/.cagefs" ]; then
chmod 775 $HOMEDIR/.cagefs
chmod 700 $HOMEDIR/.cagefs/tmp
chmod 700 $HOMEDIR/.cagefs/var
chmod 777 $HOMEDIR/.cagefs/cache
chmod 777 $HOMEDIR/.cagefs/run
fi

How to Use the Script

  1. Save the Script: Save the code to a file named fixperms.sh.
  2. Make It Executable: Run chmod +x fixperms.sh to make the script executable.
  3. Run the Script: Execute the script by running bash fixperms.sh <username>, replacing <username> with the cPanel username.

Conclusion

This script provides a quick way to standardize file and directory permissions for cPanel users, enhancing security and functionality. Always test scripts in a safe environment before applying them to production servers.

By following these steps, you can ensure that your cPanel environment is secure and operating smoothly.

23 Aug

How to install CloudLinux on cPanel Server

cPanel server with Cloudlinux is a very popular setup in the webhosting industry especially for shared webhosting industry because this give an administrator right power to control resource of each user and at the same time best performance and page load speed for their website with advance level security protection.

Before installing cloudlinux We highly recommend to upgrade MySQL to MariaDB 10.2 because by default MySQL comes with 5.6 and end of life of this version is February 28, 2018. You can upgrade MySQL to MariaDB from WHM >> SQL Function >> MySQL/MariaDB Upgrade.

Next We are going to install Cloudlinux, Download Cloudlinux installation script:

wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

Install the script:

sh cldeploy -i [For IP based license]

or

sh cldeploy -k [For IP based license]

Then reboot the server:

reboot

You can install Lvemanager using below command(In most case it will be automatically installed):

yum install lvemanager

Next install cagefs with the following command:

yum install cagefs
/usr/sbin/cagefsctl –init
cagefsctl –enable-all

Next We need Alt-PHP (PHP Selector):

yum groupinstall alt-php
yum update cagefs lvemanager

Now you can proceed to your WHM >> Cloudlinux LVE Manager and here you can configure Cloudlinux Features including cagefs, python, nodejs and php selector.

If you are running Apache server, you can install mod_lsapi. It can improve performance for many web sites.

Log into SSH and run the following commands:

yum install liblsapi liblsapi-devel –enablerepo=cloudlinux-updates-testing
yum install cpanel-mod-lsapi –enablerepo=cloudlinux-updates-testing
/usr/bin/switch_mod_lsapi –setup
/usr/bin/switch_mod_lsapi –enable-global
service httpd restart

If you still have questions or concerns, feel free to contact us by sending email to following address: support [at] tetrahostbd.com

27 Dec

cPanel to increase license price (again!) from 1st January, 2022

cPanel has announced another price increase taking effect on January 1st, 2022. Therefore, some changes should be expected in your invoices starting from the said date.

Below is the announcement email that We received from cPanel:

As a cPanel Partner, we understand that any change in our pricing model has a direct effect on your business. With this in mind, we strive to not only manage our costs appropriately but also provide transparency to you wherever possible. We are contacting you today to notify you of a pricing adjustment that will take effect January 1, 2022.
Our team remains passionate about providing the most reliable and intuitive server and site management platform on the market. We are proud to be the leader in the market and are continually expanding our product portfolio. Our goal is to enable our partners to increase revenue, increase margins, and reduce churn.

In 2021 we have delivered:

Increased performance through NGINX® and the ability to isolate email servers with the Mail Nodes feature
Broad Linux support through AlmaLinux OS
Ease of management through DNS Zone Manager and live transfers
Ease of use features such as Exchange ActiveSync to synchronize email, calendar, and contacts
In 2022, you can look forward to our new modernized interface, Ubuntu® support, and much more. We are excited to share our upcoming roadmap with you soon.

We are also excited to announce that starting on October 1st, we are including WordPress® Toolkit Deluxe with cPanel at no additional charge.

13 Dec

cPanel Price to Increase (Again) from 1st January, 2021

cPanel is a well known supplier of a control panel to simplify hosting and server management. For more than 20 years it has been the leading hosting automation platform and is the preferred hosting control panel software worldwide. They have announced another price increase within 15 months. We expect 10-15% price will increase per license.

Below is the copy of the mail cPanel sent it to its partners:

Dear cPanel Partner,

Over the last 12 months, we’ve continued to listen and to deliver many critical features and capabilities. These enhancements include installations and updates now completing in less than five minutes, substantially reduced memory footprint, and meaningful improvements to the core mail, DNS systems (DNSSEC), and expansion of our NGINX support.

Many of these product enhancements are deeply focused on our Partners as we work to deliver against our strategy of increasing product performance and developing highly requested features that allow our Partners to generate more value for their business.

To make sure you get the best possible product experience and support, we review our prices annually. As a result of our recent pricing review, we’ve made some changes to our pricing that will become effective on January 1, 2021. You can find more information about our new pricing here, in the table below or by downloading the 2021 cPanel PartnerNOC License Guide here: https://go.cpanel.net/partner-license-guide.

Further, you may be eligible for additional discounts by becoming a cPanel Certified Partner. More information is available here: https://cpanel.net/partners/#certified

Keep innovating, building, developing, designing, and hosting, and know that we continue to make investments to improve everyone’s cPanel experience.

We’re also here to help. If you have questions, please email your account manager:

– The cPanel Team

The cPanel Discussion forum thread:
https://forums.cpanel.net/threads/cpanel-price-increase-2021.679609/

WHT Forum Discussion thread:
https://www.webhostingtalk.com/showthread.php?t=1770316

TetraHost User:

We are trying hard not to increase the price for existing shared hosting user. But for new cPanel permission, price will increase definitely. VPS or Dedicated License user price will increase too.

Price increase isn’t something We do usually but when it is forced, We have to maintain the new pricing structure to maintain the service. TetraHost is ready to help! We are pleased to assist and advise you on cPanel price adjustment. Don’t hesitate to contact us at billing [at] tetrahostbd.com, or can reach us via live chat or call us at +8801913377417.

Thank you for your attention. Have a nice day!

22 Jul

Massive cPanel Price Increase and Its Effects to End User

On Thursday 27 Jun 2019 cPanel announced new pricing and licensing structure. Previously the pricing model was set per server which they have now changed to per-account model. In a nutshell, previously a server with cPanel license can create any numbers of account but now, We will have to pay for each account created on a cPanel server.

cPanel is increasing their software price after two decades. The server hardware technology has evolved and they have also made better optimization on their software which allow a server to run multiple website. Because of this they are enforcing the price increase to us.

cPanel was acquired by Oakley Capital at the beginning of this year which own another web hosting control panel, Plesk. A price increase was expected but not the way cPanel announced last month. We have already contacted our account manager at cPanel and informed them about our displeasure regarding the new pricing. We hope cPanel will re-evaluate their new pricing structure which seems to have a very narrow chance!

As per cPanel’s new account based pricing structure, We the Hosting company have to pay them 17tk/month or 200tk/year for every cPanel account that is created on a server. If everything stays as per the recent cPanel announcement, We will have to adjust pricing. We do not expect a price adjustment for our shared or semi dedicated hosting packages meaning they will remain same. But for Reseller customer, We will have to adjust the pricing due to the fact cPanel will now charge us for each cPanel account a reseller creates or already have.

We can assure you that, from TetraHost, We will only charge the extra amount which is being charge with the cPanel’s new account based pricing structure. For example, if a reseller has 20 cPanel account under his/her reseller/WHM account, then We will have to charge the customer 20 x 200tk = 4000tk per year for this purpose. It can be charged monthly or yearly as per customers comfort.

We will have to adjust VPS and Dedicated server license prices as well. VPS and Dedicated Server customers are requested to contact us to find out about their new license price.

We are still reviewing the price increases and we will update our clients if there is something new from cPanel regarding their new pricing structure.

This new structure affects all existing customers and comes into effect from 1st September 2019.

We’re happy to advise you on what are the best next steps in dealing with this cPanel price increase. Our goal is to be your IT expert and helping you find the best option, specifically for you and your business. If you have any suggestions regarding this matter, you are Welcome to share them with us as well.

To get in touch with us, simply use the Contact Us form, email us at sales@tetrahostbd.com, call us at +8801913377417, or use the live chat at the bottom right corner of our Website.

21 Dec

Announcement: R1Soft Restore Backups

We live in a digitalized world where most of the processes of your company have shifted to the online realm. The website of your company contains all the critical information about your company which if lost can prove to be a huge trouble for your organization. Thus, what you need is a daily backup plan which will keep an online backup of all your company data on a regular basis and will prevent it from getting lost.

We are pleased to announce revolutionary R1Soft Server Backup Manager backups are available on all shared hosting and reseller servers effective 21/12/2017. R1Soft backup interface can be accessed by visiting “R1soft Restore Backups” Icon in cPanel files section which will take you to our backup servers. You can restore any file or folder from this interface including entire account home directory if required. Client will be able to restore databases as well from same panel.

Protection of your data is our foremost priority and this is only an additional layer which will provide you full control of your backups.

For more information regarding R1Soft Server Backup Manager Technology please visit: https://www.r1soft.com/product-features

We have prepared an video tutorial and uploaded it to Youtube. We hope this will help you access/manage R1Soft backup feature and restore files.

There will be 10 restore point currently which means our clients will be able to restore data from last 10 days. This is an addon service from TetraHost which cost nothing extra 🙂

Please feel free to contact us if you have any questions regarding this service.

13 Aug

Latest cPanel v11.25

cPanel was already upgraded to 11.25 sometime ago. Today i will try to write an short summery of the new cPanel version.

New cPanel bring a whole range of new features including the ability to edit DNS zones right from cPanel, an enhanced AJAX interface and more.

Performance

cPanel/WHM 11.25 implements some major changes throughout our mailing system. We’ve adjusted the Exim configuration to allow a single process to listen on multiple ports, thereby reducing RAM and CPU usage. In addition to this, we’ve also improved quota lookup efficiency.

RoundCube webmail can now operate using the lightweight SQLite database engine. This gives each email account its own SQLite database, and assigns ownership of the RoundCube process to the cPanel account, for easier process accounting.

Version 11.25 also updates RoundCube, SquirrelMail, and Mailman to their most current versions.

Security

We know that security is important to you. That’s why we’ve added numerous security features to cPanel/WHM 11.25. Our new security token system attempts to prevent cross-site request forgery (XSRF) attacks by appending URLs with a session token in the form of cpsess. When this feature is enabled, absolute URLs are no longer allowed. This new feature helps to ensure a safe environment for you and your customers.

Refined User Interface

We’ve revamped the cPanel home page with even cleaner HTML, and reduced the number of HTTP requests the page sends, resulting in shorter load times. Plus, we optimized the CSS used by cPanel, to speed page loading throughout the entire cPanel interface.

We’ve also overhauled one of cPanel’s most frequently accessed areas: the Email Accounts page. It now combines all the major functionality involved with email accounts into a single page: you can add, search, sort, and delete accounts, as well as change passwords and quotas, all without leaving the page. With its clean new design, this page provides a faster, more intuitive way to manage your email.

cPanel/WHM 11.25 comes equipped with an improved editor for MX (mail exchanger) entries. This new editor allows you to configure multiple mail exchangers with the same priority, for balancing the load on your mail servers.