cat /etc/cyberpanel/mysqlPassword
linux control screen brightness
xrandr --output LVDS-1 --brightness 1.0
cPanel disable ForcePassiveIP
rm -rvf /var/cpanel/conf/pureftpd/main.cache
vim /var/cpanel/conf/pureftpd/main
Comment or remove ForcePassiveIP
FTP error usually looks like this:
The data connection cannot be established: ECONNREFUSED – Connection refused by the server.
systemd 111
netstat -natp| grep :111
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
To 111 port listening disable you can like this:
systemctl stop rpcbind.socket
systemctl disable rpcbind.socket
Removed symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket
pure-ftpd[]: (?@?) [DEBUG] Couldn’t load the DH parameters file /etc/ssl/private/pure-ftpd-dhparams.pem
openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 3072
Generating DH parameters, 3072 bit long safe prime, generator 2
This is going to take a long time
/scripts/restartsrv_pureftpd
service pure-ftpd status
systemd[1]: Started Pure-FTPd.
directadmin change email password command line
grep user /etc/virtual/somedomain.com/passwd
user:$1$saltsalt$axvmnqdjkdE/BsPlbO6H/.:666:21::/home/web1/imap/somedomain.com/user:/bin/false
openssl passwd -1 -salt saltsalt KuX0oisaigoowe
$1$saltsalt$axvmnqdjkdE/BsPlbO6H/.
Random password was set to: KuX0oisaigoowe
This MD5-Crypt hash
php allow access only from specific ip
if(!in_array($_SERVER['REMOTE_ADDR'],array('xx.xx.xx.xx'))){
die();
}
Error: unsupported deleted submount: (deleted)/dev/log
Setting up checkpoint…
set CPU flags..
suspend…
Can not suspend container: Invalid argument
Error: unsupported deleted submount: (deleted)/dev/log
Checkpointing failed
Error in run_cmd (pcopy.c:334): Command date ‘+%s.%N’ > /tmp/tmp.sJn0B2zf0e; vzctl –skiplock chkpnt 31581 –suspend –flags 161183 1>&2 failed with code 16
Error: ploop copy -s /dev/ploop45973 failed
Error: Failed to copy top ploop delta
Killed by signal 15.
To find issue:
grep /dev/log /proc/*/mountinfo 2>/dev/null
/proc/20518/mountinfo:259 239 0:85 /log /dev/log rw,nosuid,relatime shared:161 – devtmpfs devtmpfs rw,size=1792000k,nr_inodes=448000,mode=755
lsof -p 20518
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mysqld 30264 mysql cwd DIR 182,735569 4096 5768267 /var/lib/mysq
Delta RPMs disabled because /usr/bin/applydeltarpm not installed
yum install deltarpm
Firmware state: Copyback
while $(true); do /root/bin/MegaCli64 adpeventlog getlatest 200 -f ~/adpeventlog.txt a0; awk '/^Time/{TIME=$0};/Seconds/{SECS=$5}/^Event Desc/{printf("%25.25s %5.5s %s\n",TIME,SECS,$0);TIME=" ";SECS=""}' ~/adpeventlog.txt|grep -v fan|tac; sleep 5; done
Status:
Time: Tue Aug 20 16:11:43 Event Description: CopyBack progress on PD 10(e0x04/s12) is 82.04%(24461s)
Time: Tue Aug 20 17:30:05 Event Description: CopyBack progress on PD 10(e0x04/s12) is 83.04%(29163s)
Time: Tue Aug 20 18:21:06 Event Description: CopyBack progress on PD 10(e0x04/s12) is 84.04%(32224s
show all connected nfs clients
ss -a|grep nfs
dump mysql frm strcuture
mysqlfrm --diagnostic /root/table.frm
Cloudlinux license isn’t valid
cloudlinux-selector
{“result”: “Cloudlinux license isn’t valid”, “timestamp”: 1565592104.677679}
yum install rhn-setup –enablerepo=cloudlinux-base
/usr/sbin/clnreg_ks –force
sed replace recursive
grep -rl oldtext . | xargs sed -i 's/oldtext/newtext/g'
openvz limit smtp connection
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A FORWARD -s xx.xx.xx.xx/32-p tcp -m multiport --dports 25,587,465 -j LOG --log-prefix "FORWARD:DROP:" --log-level 6
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp --dport 465 -m limit --limit 1/sec -j ACCEPT
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp --dport 587 -m limit --limit 1/sec -j ACCEPT
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp --dport 25 -m limit --limit 1/sec -j ACCEPT
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp --dport 465 -j DROP
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp --dport 587 -j DROP
-A FORWARD -s xx.xx.xx.xx/32 -p tcp -m tcp --dport 25 -j DROP