Monthly Archives: August 2012

Restricting sshd by username

Step # 1: Open sshd_config file # vi /etc/ssh/sshd_config Step # 2: Specify a user Only allow user king to login by adding following line: AllowUsers king Step # 3: Restart sshd Save and close the file. In the above … Continue reading

Posted in Linux | Comments Off on Restricting sshd by username

Changing the MySQL timezone via PHP

If you don’t have root access in your mysql instance and want to change the time_zone, you’ll have to change it in the code: To have the time zone setup as you would like, you would you need to execute … Continue reading

Posted in Linux | Comments Off on Changing the MySQL timezone via PHP

Letting WordPress users install themes, plugins without FTP credentials

Quick answer: Put this in the user’s wp-config.php file: define(‘FS_METHOD’, ‘direct’); If you are having trouble updating the core wordpress, remember that no matter what the permissions are, wordpress needs it to be owned by apache:apache.

Posted in Linux | Comments Off on Letting WordPress users install themes, plugins without FTP credentials

Redirecting MySQL

To redirect traffic from one db to another (as a temporary measure if you have multiple places in your app to change the login data) you might try this: iptables -t nat -A PREROUTING -p tcp –dport 3306 -j DNAT … Continue reading

Posted in Linux | Comments Off on Redirecting MySQL

Which script sent this email

Sometimes you have multiple php scripts that send email and want to find out which one sent a specific email. I followed the instructions here: http://www.iezzi.ch/archives/217 Worked like a charm.

Posted in Linux | Leave a comment