Posts Tagged ‘linux’

schroot – chroot for any users

January 7th, 2010

From manpages: schroot allows the user to run a command or a login shell in a chroot environment. If no command is specified, a login shell will be started in the user current working directory inside the chroot.

I’ve been trying some virtual machines solutions to execute some programs 32bits in my machine. But it’s take very time, start a xen VM or virtualbox. Often this solutions needs some maintain additional costs to setup a X server to run any X-based program.

» Read more: schroot – chroot for any users

OpenSSH logging with ChrootDirectory

January 7th, 2010

Finally following up on the previous article on the subject, I found some time to investigate logging what happens in an internal-sftp session using rsyslog.

Making syslog available in the chroot

Simply create a dev directory in each one of the chosen user chroot directories.

# mkdir /home/user/dev

Configuring rsyslog to probe the new logging source

Simply drop the following contents in /etc/rsyslog.d/sshd.conf :

# Create an additional socket for some of the sshd chrooted users.
$AddUnixListenSocket /var/fileserv/dev/log

# Log internal-sftp in a separate file
:programname, isequal, "internal-sftp" -/var/log/sftp.log
:programname, isequal, "internal-sftp" ~

 » Read more: OpenSSH logging with ChrootDirectory

inux: rm and the ‘Argument list too long’ error message.

January 6th, 2010

Linux: rm and the ‘Argument list too long’ error message.

Linux: rm and the ‘Argument list too long’ error message.


Let’s say you wanted to delete all the files in a directory that begins with the word ’spam’:

[root@yoursite filter]# rm spam*

bash: /bin/rm: Argument list too long

ERROR!

This happens when you are trying to delete too many files in a directory at the same time – it seems rm has limits ….

To solve the problem:

Use ‘find’ to pipe all the matching files to ‘rm’, one at a time.

[root@yoursite filter]# find . -name ’spam*’ | xargs rm

» Read more: inux: rm and the ‘Argument list too long’ error message.

Installing Xen 3.0 upon Debian Unstable, with a custom Kernel

December 31st, 2009

Recently we demonstrated the process of installing a binary release of Xen 3.0 on Sarge, since the packages on Debian Unstable are not yet available for Xen 3.0 we’re now going to look at installing it via the packages provided by Ralph Passgang. This also includes building a custom Xen kernel from source.

The advantage to building the Xen kernel from source is that you can add, or remove, drivers – so the kernel is utterly customised for your

» Read more: Installing Xen 3.0 upon Debian Unstable, with a custom Kernel