vsftpd: refusing to run with writable anonymous root
Today i was trying to setup a simple ftp to recover some logs from different machines (set top boxes at work).
I wanted to use a python script to enter machines and repeat some commands, because i’ve found really useful telnet libraries, but, anyway, main topic….
My laptop at work uses ubuntu 10.04, so i installed vsftpd, but it was not so easy for ready to use using anonymous login.
After enabling a lot of anonymous options commented i found i needed to create some directory by hand to allow anonymous upload.
being /srv/ftp home directory for ftp user....
sudo mkdir /srv/ftp/uploads
At at last. vsftpd: refusing to run with writable anonymous root
I found out why it wasn’t going through.
/srv/ftp CANNOT be writable.
/srv/ftp/incoming CAN be writable.
sudo chmod -w /srv/ftp/ and problem solved
So the root directory can’t be writable, but subdirectories within the root directory can.
Hope this helps for anyone using a search engine.
Etiquetas: anonymous root, ftp, ubuntu, vsftpd, writable anonymousDebian/Ubuntu and MacOS X. Sharing files using netatalk
Intro
If you are trying to share files using a fast protocol (that’s not samba) which fits into debian and MacOS you should install netatalk package.
You will find the trap only if you are using netatalk from the usual Debian apt-source and if you have altered MacOS X default to do not use clear text passwords.
You’ve 2 solutions:
- MacOS X won’t connect to the Debian Linux server, just saying that the access name or password wasn’t right, but has never asked for one. Just enable clear text passwords in MacOS X when you connect to an afp server and it will work like a charm.
- OpenSSL support is currently disabled, because of licensing issues: The Free Software Foundation and Debian consider the GNU General Public License (GPL) under which Netatalk is licensed to be incompatible with the OpenSSL license.You can build locally with OpenSSL using the following commands
Using netatalk you can use any Debian server as a time machine backup, just read some manuals to know how.
Quick reference
To be up to date, look into /usr/share/doc/netatalk/README.Debian
usuario@LOCAL:~/$ sudo aptitude install devscripts
usuario@LOCAL:~/$ sudo aptitude build-dep netatalk
usuario@LOCAL:~/$ apt-get source netatalk
usuario@LOCAL:~/$ cd netatalk-*
usuario@LOCAL:~/$ dch -l +ssl -D local –force-distribution “Local build with OpenSSL.”
usuario@LOCAL:~/$ DEB_AUTO_UPDATE_DEBIAN_CONTROL=1 DEB_BUILD_OPTIONS=openssl debuild -us -uc
(You my need additional build-dependencies not resolved automatically.)
usuario@LOCAL:~/$ dpkg -i ../netatalk*.deb
Alternatively you can subscribe to unofficial(!) precompiled packages by adding the following to your /etc/apt/sources.list:
usuario@LOCAL:~/$ cat /etc/apt/sources.list
….
#where following $DIST=stable, testing, unstable, wheezy, …
#look into http://debian.jones.dk/dists/ to know which one are available
deb http://debian.jones.dk/ $DIST netatalk
…
Here are my config files
usuario@LOCAL:~/$ cat /etc/netatalk/afpd.conf
# default:
# – -tcp -noddp -uamlist uams_dhx.so,uams_dhx2.so -nosavepassword
- -transall -uamlist uams_dhx.so -nosavepassword -advertise_ssh
.
usuario@LOCAL:~/$ cat /etc/netatalk/AppleVolumes.default
# The line below sets some DEFAULT, starting with Netatalk 2.1.
: DEFAULT: options:upriv,usedots
/PATH/TO/MY/disk MYDISKNAME allow:myselecteduser cnidscheme:dbd options:usedots,upriv
# End of File
Links and references
Etiquetas: afpd, apt, aptitude, backup, debian, gnu, linux, macos, netatalk, sharing files, software, time machineDebian Tip. Purge Removed Packages
Some packages are not *totally* removed when you select them for removal in Debian &Co. They usually left some user customized info, etc. That’s why you should totally remove them, or in Debian world,
dpkg -l |awk ‘/^rc/ {print $2}’ |xargs sudo dpkg –purge
Etiquetas: apt, awk, debian, dpkg xargsChange desktop/virtualbox console/command line resolution for linux
Tired of using a little and poor window 640×480 terminal window with your virtualbox/desktop console
First, edit /etc/default/grub and change/uncomment variable GRUB_GFXMODE with your desired value.
…
GRUB_GFXMODE=1680×1050
…
Later on, you should also edit /etc/grub.d/00_header and insert “gfxpayload=keep” as seen next:
…
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
set gfxmode=${GRUB_GFXMODE}
set gfxpayload=keep
insmod gfxterm
insmod ${GRUB_VIDEO_BACKEND}
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don’t
# understand terminal_output
terminal gfxterm
fi
fi
…
If you want to know which resolutions have you got available, you can use hwinfo (hwinfo package in Debian and so)
jack-sparrow:/home/enrgar# hwinfo –framebuffer
02: None 00.0: 11001 VESA Framebuffer
[Created at bios.464]
Unique ID: rdCR.h_b_dKkqAnF
Hardware Class: framebuffer
Model: “NVIDIA MCP79 Board – mcp7a-uo”
Vendor: “NVIDIA Corporation”
Device: “MCP79 Board – mcp7a-uo”
SubVendor: “NVIDIA”
SubDevice:
Revision: “Chip Rev”
Memory Size: 14 MB
Memory Range: 0xd1000000-0xd1dfffff (rw)
Mode 0×0300: 640×400 (+640), 8 bits
Mode 0×0301: 640×480 (+640), 8 bits
Mode 0×0303: 800×600 (+800), 8 bits
Mode 0×0305: 1024×768 (+1024), 8 bits
Mode 0×0307: 1280×1024 (+1280), 8 bits
Mode 0x030e: 320×200 (+640), 16 bits
Mode 0x030f: 320×200 (+1280), 24 bits
Mode 0×0311: 640×480 (+1280), 16 bits
Mode 0×0312: 640×480 (+2560), 24 bits
Mode 0×0314: 800×600 (+1600), 16 bits
Mode 0×0315: 800×600 (+3200), 24 bits
Mode 0×0317: 1024×768 (+2048), 16 bits
Mode 0×0318: 1024×768 (+4096), 24 bits
Mode 0x031a: 1280×1024 (+2560), 16 bits
Mode 0x031b: 1280×1024 (+5120), 24 bits
Mode 0×0330: 320×200 (+320), 8 bits
Mode 0×0331: 320×400 (+320), 8 bits
Mode 0×0332: 320×400 (+640), 16 bits
Mode 0×0333: 320×400 (+1280), 24 bits
Mode 0×0334: 320×240 (+320), 8 bits
Mode 0×0335: 320×240 (+640), 16 bits
Mode 0×0336: 320×240 (+1280), 24 bits
Mode 0x033d: 640×400 (+1280), 16 bits
Mode 0x033e: 640×400 (+2560), 24 bits
Mode 0×0345: 1600×1200 (+1600), 8 bits
Mode 0×0346: 1600×1200 (+3200), 16 bits
Mode 0×0347: 1400×1050 (+1400), 8 bits
Mode 0×0348: 1400×1050 (+2800), 16 bits
Mode 0×0349: 1400×1050 (+5600), 24 bits
Mode 0x034a: 1600×1200 (+6400), 24 bits
Mode 0×0352: 2048×1536 (+8192), 24 bits
Mode 0×0360: 1280×800 (+1280), 8 bits
Mode 0×0361: 1280×800 (+5120), 24 bits
Mode 0×0362: 768×480 (+768), 8 bits
Mode 0×0364: 1440×900 (+1440), 8 bits
Mode 0×0365: 1440×900 (+5760), 24 bits
Mode 0×0368: 1680×1050 (+1680), 8 bits
Mode 0×0369: 1680×1050 (+6720), 24 bits
Mode 0x037b: 1280×720 (+5120), 24 bits
Mode 0x037c: 1920×1200 (+1920), 8 bits
Mode 0x037d: 1920×1200 (+7680), 24 bits
Config Status: cfg=new, avail=yes, need=no, active=unknown
Links and references
- GRUB 2, graphical boot tips to set the desired VGA console mode.
- enable GFXPAYLOAD on /etc/default/grub
Change trash IMAP folder in Mozilla Thunderbird (Icedove in Debian)
- Exit icedove (thunderbird)
- Insert a line like the code attached next into “prefs.js”, with the correct server# and correct name for the Trash folder:
- Start icedove (thunderbird)
enrgar@jack-sparrow:~$ emacs .mozilla-thunderbird/0w697id6.default/prefs.js
…
user_pref(“mail.server.server6.trash_folder_name”, “[Gmail]/Trash”);
…
References and links
Etiquetas: debian, icedove, thunderbird, trash folder, trash gmail folder, trash imap folderSpeed up Gnome
This can do a bit of magic on your desktop.
enrgar@jack-sparrow:~$ gtk-update-icon-cache -f /usr/share/icons/THEMENAME/
Links and references
- gnome-appearance-properties profiling update
- Speed up the Gnome Menu and Fix the Annoying Icon Delay
Compact a VirtualBox Window$ Guest on Debian
If you run Window$ as a virtual machine in a dynamically expanding storage within Debian/Linux using VirtualBox, maybe you’re interested in compact the VDI to save space.
First, you need to download the SDelete application from the Sysinternals web site and extract the zip file in your Window$ drive.
From a command prompt (Start/Run and type ‘cmd‘ to open a command prompt) move to the directory which contains the “sdelete.exe” file and type the followind command:
scdelete -c C:
Shutdown your Windows Guest Machine after fill with zeros the free space in the disk with the previous command and type the following commands from a terminal replacing “MACHINE.vdi” with the name of your VDI:
enrgar@jack-sparrow:~$ VBoxManage modifyhd –compact MACHINE.vdi
Adding as mental note.
Links
Etiquetas: debian, scdelete, sysinternals, vdi, virtualbox, window$ guestRecovering files with errors skipping media errors (whatever media is CD, DVD, HD…)
This quick tip will not fix any phisical error in any file, but will help to copy it somewhere else.
(In Debian this commands comes in coreutils package)
user@debian-machine:~$ dd if=/path/to/file/origin of=/path/to/file/destiny cond=noerrors
Why this should work
Multimedia programs usually have problems playing files which present some kind of error accesing the media where the file is stored.
Although some of the bits lost could barely represent a frame of a film, the other BIG part is still there but the multimedia program stops or whatever. So, if we “move” the file from media this problems could disapear and we can still play and enjoy our lovely film.
PD: I wonder why I didn’t publish this before. I searched for it in the blog some days ago. Today, trying to release a bunch of draft post, I found it, weha!!
Etiquetas: cd error, dd, dvd error, errors, hd error, media, recovering error, recovering filesEstos son los resultados para ...
Últimos comentarios