Posts Tagged ‘Linux’

ProFTP Enable Transfer Resume

Edit proftpd.conf # Allow uploads to resume AllowStoreRestart    on # Allow downloads to resume AllowRetrieveRestart    on

RedHat Enabled Passive FTP

// List the modules installed lsmod // Load the ip_conntrack_ftp module modprobe ip_conntrack_ftp Edit /etc/sysconfig/iptables-config to include: IPTABLES_MODULES=”ip_nat_ftp ip_conntrack_ftp”

ProFTP enable FXP

Edit /etc/proftp.conf <Global> AllowForeignAddress on </Global>

ProFTP login Delay

Edit /etc/proftpd.conf adding the following lines: UseReverseDNS       off IdentLookups        off

General Exim Commands and Info

exim -bp ⇒ show queue entries (like mailq for sendmail) exim -bpc ⇒ no of emails currently mail queue have exim -M email-id ⇒ Force delivery of one message exim -qf ⇒ Force another queue run exim -qff ⇒ Force another queue run and attempt to flush the frozen messages exim -Mvl messageID ⇒ View […]

Qmail: forward emails to a PHP script

In qmail, first add the domain alias. For myscript@servername make /var/qmail/alias/.qmail-myscript If its for myscript@mydomain.com /var/qmail/mailnames/mydomain.com/.qmail-myscript should do it. Contents need to be along the lines of: |/var/www/vhosts/mydomain.com/httpdocs/script.php references: http://www.devarticles.com/c/a/PHP/Incoming-Mail-and-PHP/1/ http://forum.swsoft.com/showthread.php?t=40510&highlight=qmail+alias

Curl Error: openssl missing CA

This seems to happen with different versions on libcurl on el4. Just make sure that there is a ca-bundle in the right place: mkdir -p /etc/pki/tls/certs && ln -s /usr/share/ssl/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt You can find where its looking for the bundle using curl -v : curl -v https://www.google.co.uk * About to connect() to www.google.co.uk port 443 […]

Convert SSL from pfx to pem

Convert an SSL certificate from IIS pfx to Apache pem format: # Export the private key file from the pfx file openssl pkcs12 -in filename.pfx -nocerts -out key.pem # Export the certificate file from the pfx file openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem # This removes the passphrase from the private key so […]

Compare RPM’s on two servers

Useful if your migrating from an old server to a new one and want to check everything needed is installed. First, pull a list of RPM package by name only: rpm -qa –queryformat=’%{NAME}\n’ | sort > server.txt Once you’ve done that on both servers, just use diff to compare the two files: diff serverold.txt servernew.txt […]

Recursively change file permissions

If you chmod -R it will recursively chmod everything whether it be a file or directory. A more sensible way is: # Change directories find . -type d -exec chmod 755 {} \; # Change files find . -type f -exec chmod 644 {} \; Obviously chowning is similar: find . -type f -exec chown […]