Skip to main content


Showing posts from August, 2018

Vsftpd LXC ERR500

VSFTPD in container list error 500 When running VSFTPD in a container (LXC here, did not try on Docker), default configuration makes directory listing unavailable. Listing directory content generate an Error 500: $ lftp cd ok, cwd=/os lftp> ls ls: Fatal error: 500 OOPS: This is due to the fact VSFTPD use "seccomp" (well, dont ask what it is: I dont know) In order to work arround, I just had to add this line to the VSFTPD configuration: seccomp_sandbox=NO There are many references to this, no need for me to be anotehre reference, I just wrote this article as a reminder for myself:

disorder file awk

Randomize a file lines with AWK The goal here is simple: I have a file (music playlist, user list,...) I want to disorder it, just like I woul beat the cards I asked this a long time ago on Usenet (fr.comp.os.unix), and I got this anwser from St├ęphane CHAZELAS. If the file is not too big: awk < fichier '{a[n++]=$0} END{for(srand();n--;a[i]=b) {b=a[n];a[n]=a[i=int(rand()*NR)]}; while(++n<NR)print a[n]}' Otherwise: awk < fichier 'BEGIN{srand()}{print rand(),$0}'  | sort -k1,1 | cut -d -f2- I write it down here just for the archives