PHP Sessions causing Error

Currently your messages log is filling up with errors and the system is unstable. Check the message log: $ server# tail -f /var/log/messages Jul 28 08:57:30 mail kernel: EXT4-fs warning (device sda3): ext4_dx_add_entry: Directory index full! Check the sessions directory $ server# php -i | grep session.save_path session.save_path => /var/lib/php/session => /var/lib/php/session $ server# du […]

Read More

rsync from one server to another

Basically, $ rsync options source destination Synchronize Files From Local to Remote (Plesk to cPanel) $ rsync -avz /var/www/vhosts/domain.com/httpdocs/ sshuser@192.168.200.99:/home/user/public_html/ Synchronize Files From Remote to Local )cPanel to Plesk) $ rsync -avz sshuser@198.50.162.99:/home/username/public_html/ /var/www/vhosts/domain.com/httpdocs/ Here is a short summary of the options available in rsync. Please refer to the detailed description below for a complete […]

Read More

Export/Import Mysql Database

Export a database mysql # mysqldump -u -p username database_name > dbname.sql Plesk Server # mysqldump -u admin -p`cat /etc/psa/.psa.shadow` wordpress_database > domain_backup_7.16.14.sql To export a single table from your database you would use the following command: # mysqldump -p –user=username database_name tableName > tableName.sql Import a database or table # mysql -p -u username […]

Read More

Find All Files and Directories that are permissions 777

For directories [root@server]# find /var/www/vhosts/domain.com/httpdocs -type d -perm 777 -print Set to 755: root@server ]# find /var/www/vhosts/domain.com/httpdocs/ -type d -perm 777 -exec chmod 755 {} \; For Files [root@server]# find /var/www/vhosts/domain.com/httpdocs -type f -perm 777 -print Set to 644: [root@server]# find /var/www/vhosts/domain.com/httpdocs -type f -perm 777 -exec chmod 644 {} \;

Read More