Skip to main content

Posts

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 ftp://192.168.99.58/os/ cd ok, cwd=/os lftp 192.168.99.58:/os> 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: https://bugs.launchpad.net/serverguide/+bug/1302096 https://www.linuxquestions.org/questions/gentoo-87/vsftpd-error-500-vsf_sysutil_bind-priv_sock_get_int-priv_sock_get_cmd-4175436938/ https://technologytales.com/2013/09/21/turning-off-seccomp-sandbox-in-vsftpd/

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