Posts Tagged ‘Linux’

Plesk PHP open_basedir changes

To make a change to PHP for a site in Plesk, such as opening open_basedir, edit /var/www/vhosts/$domain/conf/vhost.conf. You would then add : <Directory /var/www/vhosts/domain.com/httpdocs> php_admin_value open_basedir “/var/www/vhosts/domain.com/httpdocs:/tmp:/THE_PATH_PHP_SCRIPT_TRIES_TO_ACCESS_TO” </Directory> After that, you will need to rebuild the apache configuration with the following command: /usr/local/psa/admin/sbin/websrvmng -v -a

MySQL Replication over SSL

##Tutorial for MySQL Replication over SSL (one-way)## ##################################################### ##Check that SSL has been compiled in SSL on both the master and the client: SHOW VARIABLES LIKE ‘have_openssl'; or mysql –ssl –help If it says disabled or yes then its fine.  If it says no then an SSL enabled version of MySQL needs to be installed. […]

Mailman reset password

Reset a mailing list password in Mailman: /usr/lib/mailman/bin/change_pw -d mydomain.com -ptemppass

Linux reset root password

A Linux servers root password can be reset in a few simple steps via single-user mode. To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by performing the following: 1. At the boot loader menu, use the arrow keys to highlight the installation […]

Linux / nix Error Codes

Not comprehensive, but comes in handy: *  EPERM 1 /* Operation not permitted */ (Linux) *  EPERM 1 /* Not owner */ (SCO Unix) *  ENOENT 2 /* No such file or directory */ *  ESRCH 3 /* No such process */ *  EINTR 4 /* Interrupted system call */ *  EIO 5 /* I/O […]

IPTables Examples

As it is a table of rules, the first rule has precedence. If the first rule dis-allows everything then nothing else afterwards will matter. * INIVIDUAL REJECTS FIRST * THEN OPEN IT UP * THEN BLOCK ALL List iptable rules: iptables -n -L (-n prevents slow reverse DNS lookup) Add rule to Reject all from […]

Horde Plesk enforce signature

To enforce a signature/footer on all users: Edit /usr/share/psa-horde/imp/config/trailer.txt

Horde Plesk disable IP checks

The Horde webmail client checks to ensure that its users sessions always originate from the same IP once open.  This can be problematical if the user has an intermittent connection or a roaming IP etc: edit /usr/share/psa-horde/config/conf.php set $conf[‘auth’][‘checkip’] = false;

Install GIT on Plesk

Install GIT on a Plesk/Centos Box doesn’t actually involve much other than a yum install and setting up key auth. Enable RPMforge repo yum install git Enable /bin/bash shell for the user in plesk. make a .ssh directory in their homedir with 700 perms Generate a keypair, or get public key of clients keypair: ssh-keygen […]

FTPS and SFTP on Plesk with ProFTP

SFTP (SSH-FTP) ————— You can add: /usr/libexec/openssh/sftp-server To /etc/shells And then select this in the account as their shell. This will give them access to only sftp with no additional software required. FTPS (FTP over SSL) ——————- Either purchase a certficate or create one: