How to increase docker container disk size (devicemapper)
PC✗3
by Stefan Pejcic
2M ago
Inside the docker container check the available disk space and get the path to the partition: root@server2:~# docker exec stefan df -h /var/lib/docker/devicemapper/mnt/bddbf234169773b6d6b52529ff32572add386085bc248a0ee807f70ce7c00adc Filesystem Size Used Avail Use% Mounted on /dev/mapper/docker-252:1-791489-bddbf234169773b6d6b52529ff32572add386085bc248a0ee807f70ce7c00adc 20G 1.2G 19G 6% /var/lib/docker/devicemapper/mnt/bddbf234169773b6d6b52529ff32572add386085bc248a0ee807f70ce7c00adc Current allocat ..read more
Visit website
Proxmox MailGateway login via Curl
PC✗3
by Stefan Pejcic
5M ago
Proxmox MailGateway login via Curl: curl -k -d 'username=root@pam' --data-urlencode 'password=sd7fv72vf' --insecure https://mf.pcx3.com:8006/api2/json/access/ticket Example response: {"data":{"CSRFPreventionToken":"65116E08:ge9N354yDwM5VeAql2QL2D9lDz3qaihWWxuca7RaUEA","role":"root","ticket":"PMG:root@pam:65116E08::u6vM+zY/WPadgc8ubP4GD0U6yu/xMzQQO34cKkjINRj5lPmXp9V36kCJRacWxxsac/dfgdfX+o46KyeT7ScePE45yfdhbcbXjhMw+wVgDS2j9IEpyJ2hGeMHcBsBVoYw1W6clSW5JqpUPnV0QwGrPR8/1OE0xyeRgdfgdfgiy08SDxN77htpJDxfYWXYi47ROPD/FMSwia1zD7LJLYpcOzNizPycV2GAL61CvpvschcPOsPUQklcmYr1AMz8kEZOKZdgFBLwy0Z5YEsmcqUJ1UfRW ..read more
Visit website
Node[175421]: pthread_create: Resource temporarily unavailable
PC✗3
by Stefan Pejcic
6M ago
Restarting a NodeJS application in cPanel *(CloudLinux) gives 503 error and the stderr.log states: Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> BrokenPipeError: [Errno 32] Broken pipe node[175421]: pthread_create: Resource temporarily unavailable node[175468]: pthread_create: Resource temporarily unavailable node[175524]: pthread_create: Resource temporarily unavailable node[175583]: pthread_create: Resource temporarily unavailable node[175654]: pthread_create: Resource temporarily unavailable node[175713]: pthread_create: Resource temporaril ..read more
Visit website
RoundCube (Internal Server Error) on CWP
PC✗3
by Stefan Pejcic
7M ago
tail -f /usr/local/cwpsrv/var/services/roundcube/logs/errors.log PHP Fatal error: Uncaught Error: Class ‘Spoofchecker’ not found in /usr/local/cwpsrv/var/services/roundcube/program/lib/Roundcube/rcube_spoofchecker.php:50 Solution: nano /usr/local/cwpsrv/var/services/roundcube/program/lib/Roundcube/rcube_spoofchecker.php before line: // Spoofchecker is part of ext-intl (requires ICU >= 4.2) $checker = new Spoofchecker(); insert: return false; The post RoundCube (Internal Server Error) on CWP appeared first on PC✗3 ..read more
Visit website
Display Country based Flags for cPanel last Login IP Address
PC✗3
by Stefan Pejcic
8M ago
Here is how to detect user country from the IP address that cPanel displays on the right side of the Tools page, and add a flag representing that country. Display Country based Flags for cPanel last Login IP Address 1.) First download the flag icons of all countries here: https://flagpedia.net/download/ Download flag icons of all countries Create a new directory “flags” under Jupiter theme and add all flags there /usr/local/cpanel/base/frontend/jupiter/flags We are going to use a free API: https://github.com/hakanensari/country and you don’t need any API key. 2.) Create a new file /var/cpanel ..read more
Visit website
Django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient?
PC✗3
by Stefan Pejcic
8M ago
After installing django on shared cPanel the following error is recorded in passenger log: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient? The error indicates that the mysqlclient module is missing, but used in the code to connect to the database. To install mysqlclient module simply enter the virtual environment and run: pip install mysqlclient If gcc compiler access is disabled in the WHM you will receive an error: Unable to execute ‘gcc’: Permission denied Unable to execute ‘gcc’: Permission denied so ask your hosting provider to e ..read more
Visit website
Execute custom script after cPanel updates
PC✗3
by Stefan Pejcic
9M ago
cPanel update script that is executed every night is /scripts/upcp and according to its code, file named /scripts/postupcp will get executed at the end: if (-e "/scripts/postupcp") { system("/scripts/postupcp"); } We can use this file to add a custom command that will execute after the update. Cloudlinux already uses it: cat /scripts/postupcp #!/bin/bash /usr/share/cloudlinux-linksafe/cpanel/hooks/cloudlinux_linksafe_hook.sh #cloudlinux-linksafe /usr/share/l.v.e-manager/cpanel/hooks/l.v.e-manager_postupcp_hook.sh #l.v.e-manager /usr/share/cagefs/cpanel/cagefs_postupcp_hook.sh #Cage ..read more
Visit website
Bring back Paper Lantern icons to Jupiter cPanel theme
PC✗3
by Stefan Pejcic
9M ago
Jupiter is the name of the new default cPanel theme, and one of the most hated things about the new theme is the new icon style: jupiter cpanel theme icons To bring back the old icons from the Paper Lantern theme to Jupiter, simply copy the icons cp -r /usr/local/cpanel/base/frontend/paper_lantern/styled/glass/icons /usr/local/cpanel/base/frontedend/jupiter/assets/application_icons And run this script to regenerate sprite icons: /usr/local/cpanel/bin/sprite_generator Woala, we got color again: paper_lantern cpanel theme icons TIP: Because these icons get rewritten when Cpanel updates the ..read more
Visit website
How to Assign Dedicated IP Addresses to cPanel Subdomains only
PC✗3
by Stefan Pejcic
10M ago
Step 1. Add the dedicated IP address to the user’s subdomain file. cd /var/cpanel/userdata/username Note: username represents the user who requires that each subdomain use a dedicated IP address. nano subdomain.example.com The file’s contents will resemble the following example: Change the IP line to reflect the dedicated IP address to assign to the subdomain, for example: ip: 192.168.0.20 Step 2. Rebuild and restart Apache After you modify the appropriate files, rebuild and restart Apache. To do this, run the following commands: /usr/local/cpanel/scripts/rebuildhttpdconf /usr/local/cpa ..read more
Visit website
How to Count and List all users on cPanel, Plesk, CyberPanel or DirectAdmin
PC✗3
by Stefan Pejcic
10M ago
cPanel To count users, run the following command: grep -Po '^(?<!#)\s\w+\s(?=:)' /etc/userplans | wc -l Also, it may be useful to list users. To do so, run the following command: cut -d":" -f1 /etc/userplans | sort -n | uniq Plesk To count users, run the following command: plesk db "SELECT COUNT(DISTINCT cl_id) FROM domains" DirectAdmin To count users, run the following command: cut -d":" -f2 /etc/virtual/domainowners | sort -n | uniq | wc -l Also, it may be useful to list users. To do so, run the following command: cut -d":" -f2 /etc/virtual/domainowners | sort -n | uniq CyberPan ..read more
Visit website

Follow PC✗3 on FeedSpot

Continue with Google
Continue with Apple
OR