วิธีการ Install FTP service และสร้าง FTP account บน Server Debian 9 1. apt install vsftpd 2. cp /etc/vsftpd.conf /etc/vsftpd.conf.orig 3. iptables -A INPUT -p tcp --dport 20 -j ACCEPT iptables -A INPUT -p tcp --dport 21 -j ACCEPT iptables -A INPUT -p tcp --dport 990 -j ACCEPT iptables -A INPUT -p tcp --dport 40000:50000 -j ACCEPT 4. adduser paetest 5. chown nobody:nogroup /home/paetest/ftp 6. chmod a-w /home/paetest/ftp7. ls -la /home/paetest/ftp8. mkdir /home/paetest/ftp/files chown paetest:paetest /home/paetest/ftp/files9. ls -la /home/paetest/ftp10. echo "vsftpd test file" |tee /home/paetest/ftp/files/test.txt11. nano -w /etc/vsftpd.confanonymous_enable=NOlocal_enable=YESwrite_enable=YESchroot_local_user=YESuser_sub_token=$USERlocal_root=/var/www/pasv_min_port=40000pasv_max_port=50000userlist_enable=YESuserlist_file=/etc/vsftpd.userlistuserlist_deny=NO 12. echo "paetest" |tee -a /etc/vsftpd.userlist cat /etc/vsftpd.userlist13. systemctl restart vsftpd14. openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem15. nano -w /etc/vsftpd.conf# rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem# rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key rsa_cert_file=/etc/ssl/private/vsftpd.pemrsa_private_key_file=/etc/ssl/private/vsftpd.pemssl_enable=YESallow_anon_ssl=NOforce_local_data_ssl=YESforce_local_logins_ssl=YESssl_tlsv1=YESssl_sslv2=NOssl_sslv3=NOrequire_ssl_reuse=NOssl_ciphers=HIGH 16. systemctl restart vsftpd17. nano -w /etc/vsftpd.conflocal_umask=022chmod_enable=YESfile_open_mode=0644 18. systemctl restart vsftpd วิธีการ Add your user to www-data group 1. usermod -aG www-data paetest 2. groups paetest paetest :paetest www-data 3. chown paetest:www-data -R /var/www/domain 4. cd /var/www/domain 5. find . -type d -exec chmod -R 775 {} \; 6. find . -type f -exec chmod -R 664 {} \;
วิธีการปรับ message_size_limit ในการใช้งาน Email บน cPanel 1. Login to WHM 2. ไปที่เมนู exim Configuration Manager >> Advanced Editor จากนั้นค้นหาคำว่า "Add additional Configuration Setting" 3. จากนั้นเลือกที่ message_size_limit และทำการปรับเพิ่ม Limit ในการส่ง Email ตามที่ต้องการ
ปัญหา ไม่สามารถ Add Slav Virtualizor ได้ ทางแก้ปัญหา 1. Edit kernel boot parameter ให้เข้าไปแก้ไขไฟล์ nano -w /etc/default/grub โดยให้เพิ่มค่า net.ifnames=0 biosdevname=0 เข้าไปในบรรทัด GRUB_CMDLINE_LINUX จากนั้นให้ทำการ Regenerate GRUB configuration file โดย run คำสั่ง # grub2-mkconfig -o /boot/grub2/grub.cfg 2. ทำการแก้ไข ifcfg file configuration ให้ถูกต้อง ตามด้านล่าง จากนั้นให้ทำการเปลี่ยน ชื่อไฟล์ # mv /etc/sysconfig/network-scripts/ifcfg-em1 /etc/sysconfig/network-scripts/ifcfg-eth0 3. ทำการ Disable NetworkManager เพื่อไม่ให้เวลา reboot แล้ว network ที่เราตั้งค่าจะกลับมาเหมือนเดิม # systemctl disable NetworkManager # chkconfig NetworkManager off 4. run : service network restart สาเหตุปัญหา ค่า default ของ network interface เวลาติดตั้ง CentOS 7 ของเครื่อง Dell EMC มาจะเป็นชื่อ em1
Example Case on Netway26 Problem : Can not restart cagefs service or CloudLinux LVE Manager in WHM Error Log : root@netway26 [~]# /etc/init.d/cagefs restart Restarting CageFS: Traceback (most recent call last): File "/usr/sbin/lvectl", line 19, in from cllimits_validator import LimitsValidator, ENTITY_USER, ENTITY_PACKAGE, ENTITY_RESELLER,ENTITY_DEFAULTS File "/opt/alt/python27/lib/python2.7/site-packages/cllimits_validator/__init__.py", line 8, in from limits_validator import LimitsValidator File "/opt/alt/python27/lib/python2.7/site-packages/cllimits_validator/limits_validator.py", line 9, in from cllimitslib_v2 import LimitsDataStorage, DEFAULTS File "/opt/alt/python27/lib/python2.7/site-packages/cllimitslib_v2/__init__.py", line 8, in from lve_storage import ( File "/opt/alt/python27/lib/python2.7/site-packages/cllimitslib_v2/lve_storage.py", line 11, in from lvectllib import paneluserslist, panelpackagesdict, LVP_DEFAULT, LVE_DEFAULT, DEFAULT_PACKAGE File "/opt/alt/python27/lib/python2.7/site-packages/lvectllib.py", line 316, in CPUINFO_DATA = _get_cpu_data_from_env() or get_cpu_data() File "/opt/alt/python27/lib/python2.7/site-packages/lvectllib.py", line 314, in get_cpu_data return [nprocs, cpuinfo['proc0']['cpu MHz']] KeyError: 'cpu MHz' [FAILED] Workaround: Edit file : /opt/alt/python27/lib/python2.7/site-packages/lvectllib.py go to line 316 and change variable follow below -->> CPUINFO_DATA = _get_cpu_data_from_env() or get_cpu_data() to -->> CPUINFO_DATA = [4, '2400'] root@netway26 [~]# /etc/init.d/cagefs restartRestarting CageFS: [ OK ]
ปัญหา เนื่องจากก่อนหน้านี้ได้มีการ Convert Easy apache 3 เป็น Easy apache 4 จึงส่งผลค่า disable_function ในไฟล์ php.ini หายไปครับ จึงได้มีการแก้ไขโดยการเพิ่มค่าเข้าไปทั้งหมด หากพบปัญหาในการใช้งาน Website สามารถดำเนินการได้ตามข้อมูลด้านล่างครับ วิธีการแก้ไขปัญหา1. ตรวจสอบ Version Mutiphp ว่าลูกค้าใช้งานอยู่ใน Version ใด WHM >> Software >> MultiPHP Manager 2. เมื่อทราบ Version ที่ลูกค้าใช้งานแล้วสามารถดำเนินการ Enable Function ได้โดย 2.1 ดำเนินการค้นหาคำว่า disable_function จากนั้นให้ทำการลบข้อมูลที่ลูกค้าต้องการใช้งานออกเช่น phpinfo , popen , system ตาม Part version ที่ลูกค้าใช้งานดังนี้ Cloudlinux alt-php44 >> /opt/alt/php44/etc/php.ini alt-php51 >> /opt/alt/php51/etc/php.ini alt-php52 >> /opt/alt/php52/etc/php.ini alt-php53 >> /opt/alt/php53/etc/php.ini alt-php54 >> /opt/alt/php54/etc/php.ini alt-php55 >> /opt/alt/php55/etc/php.ini alt-php56 >> /opt/alt/php56/etc/php.ini alt-php70 >> /opt/alt/php70/etc/php.ini alt-php71 >> /opt/alt/php71/etc/php.ini alt-php72 >> /opt/alt/php72/etc/php.ini alt-php73 >> /opt/alt/php73/etc/php.ini Easy apache ea-php54 >> /opt/cpanel/ea-php54/root/etc/php.ini ea-php56 >> /opt/cpanel/ea-php56/root/etc/php.ini ea-php70 >> /opt/cpanel/ea-php70/root/etc/php.ini ea-php71 >> /opt/cpanel/ea-php71/root/etc/php.ini ea-php72 >> /opt/cpanel/ea-php72/root/etc/php.ini