Jailkit is an easy to use tool to create and maintain jail environments for shell users on Linux. In this guide, I will show you how to move PHP and its dependencies into the jail so that the jailed user can execute PHP scripts inside the jail.
Continue reading How to add PHP support for jailed SSH users in ISPConfig 3
The bash history is a log file that contains all commands that the user executed on the Linux shell. When you use the "arrow up" key on our keyboard, then Bash will look up the previous command from that file and display it on the screen, ready to be executed again.
Continue reading How to clear Bash history on Linux?
To get a list of all installed packages on a Debian or Ubuntu server, run the command:
This command will show you a rather long list. To save the list to a file, use this command:
dpkg --get-selections > /tmp/packages.txt
the list is saved then in the file /tmp/packages.txt.
If you seek for a specific package, use the grep command:
dpkg --get-selections | grep nginx
will show you all packages that contain the word "Nginx" in their name.
root@sv1:/# dpkg --get-selections | grep nginx
The Following command can be used to check and repair all MySQL databases on a Ubuntu or Debian Linux System.
sudo mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases
mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases
The benefit of the above command is that it uses the debian-sys-maint login to MySQL which is available on every Debian and Ubuntu System, so you don't have to provide the MySQL root login details.
1.1 SCP Command Line-An Overview
The SCP command line is commonly used to copy files over SSH, and between popular Operating systems like Linux, Mac and Windows in a secure fashion. SCP is used to copy files to/from a remote server. It also allows you to copy files from one remote server to another remote server, without passing traffic through your PC.
Continue reading How to Copy Files with SCP between Linux Servers
Dovecot is watching the whole server filesystem for modifications and removed or added sub filesystems. If you get errors similar to this one on your server:
Aug 30 09:10:23 server1 dovecot: master: Warning: /var/www/clients/client1/web1/log is no longer mounted. If this is intentional, remove it with doveadm mount
(the directory path may vary), then you can fix it by excluding the path from being watched by dovecot. In my case, dovecot shall not watch my website directories as they do not contain any mailboxes
Run the following command on the shell as root user:
doveadm mount add '/var/www/*' ignore
To exclude all files and folders in /var/www from deovecot monitoring.
If you work on a dual boot system you might experience that when you log off from Windows, onto Linux, and to Windows again, the time that is shown in the bottom right corner might be an hour or more off the actual time. This will correct once you refresh it by loading the time from a time server again but will remain an issue for the next logins.
This has not directly to do with daylight savings or an incorrect time zone, but most likely with Linux assuming that the BIOS time is set to UTC while it's set to local time. So it just changes the BIOS clock according to that. Logging in to Windows with the wrong BIOS clock will result in a wrong system time.
This Linux behavior can easily be changed though, so just login to your Linux system and open a command line. First log in as root with your password:
Then enter following to open the rcS file (note that I use vi as text editor - you can use any other you like here):
Now look for the line reading UTC = yes and change it to UTC = no. Save the file and try to boot into Windows - if every other time setting is set correct you should get the right time now.
With Steam support for Linux, there will most likely be a whole lot more games coming out for Ubuntu and its consorts. While the database of games with Linux support still grows, many titles are already available.
To install Steam on Ubuntu or Linux Mint, open a Terminal and enter the following commands:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B05498B7
sudo sh -c 'echo "deb http://repo.steampowered.com/steam/ precise steam" >>
sudo apt-get update
sudo apt-get install steam
Afterwards start it with
If you get error messages from amavisd similar to the one posted below on a server which is virtualized with OpenVZ:
Mar 5 09:09:02 v100 amavis: (17378-14) (!!)TROUBLE in process_request: Error writing a SMTP response to the socket: Broken pipe at (eval 100) line 987, <GEN44> line 31.
then the issue can be caused by the NUMTCPSOCK value in the openvz limits. Even if the barrier of this limit was never met in /proc/user_beancounters, the above error occurs when more then 25% of all TCP sockets were used. The solution is to set the NUMTCPSOCK barrier and limit to a high value in the openvz container configuration file. Here a value that worked for me on a moderately used mailserver:
Finally restart the OpenVZ VM to apply the new limit value.
If you use the apache mod_security module on your apache server, you might encounter wrong 403 errors for several URL's of the cms systems. Here are some exception rules to avoid that:
For WordPress Blogs
For the ModX CMS
SecRuleRemoveById 300013 300014 300015 300016
SecRuleRemoveById 300013 300016
Add these rules inside the vhost file of the website. If you use ISPConfig to manage the server, then add the rules in the apache directives field of the website settings in ispconfig.
Many thanks to PlanetFox for providing the rules.