PostgreSQL: ERROR: permission denied to reassign objects
When reassigning all database objects to a new owner in PostgreSQL you might get this error: mydb=> REASSIGN OWNED BY admin TO new_admin; ERROR: permission denied to reassign objects This…
flush deferred messages in mail queue
In Exim: # exim -qff In Postfix: # postfix flush In Sendmail: # sendmail -q -v
move IMAP messages from one server to another
Use larch to migrate the data stored in a user's IMAP account. To install it on Debian/Ubuntu: # apt-get install larch When executing larch, it will prompt the source and…
git basic commands
List differences between versions of a file Differences in content between the working directory and the staging area: $ git diff Differences in content between the last commit and the…
subversion basic commands
Create a repository in /home/svn $ svnadmin create --fs-type fsfs /home/svn Import an existing project located in /soft/project into the newly created repository $ svn import /soft/project/ file:///home/svn/project/trunk -m 'Initial…
find location of database files
MySQL 1. Connect to the mysql console: # mysql -p 2. Look the value of 'datadir' variable to find the location of database files: mysql> SHOW VARIABLES WHERE Variable_Name =…
mysql: change a user’s password
1. Login to mysql server with a user with enough privileges (usually root) $ mysql -u root -p 2. Select the database 'mysql' mysql> use mysql; 3. Modify the password…
postfix: analyse logs using pflogsumm
pflogsumm is a great tool to quickly analyse Postfix log files. To install it: // Debian based distros # apt get install pflogsumm You can also it directly from the…
apache: PHP not working in UserDir
Some versions of Debian based distros (like Ubuntu) disable by default the usage of PHP in userdir websites (http://server/~user). To enable, remove the following lines from /etc/apache2/mods-: <IfModule > <Directory…
Permission denied: exec of … failed in apache
If apache returns 'Permission denied: exec of <filename> failed' then you are in two possible situations: 1. 'filename' IS A CGI SCRIPT There could be several reasons for this, for…