Posted (Updated ) in Linux

Update 2011-10-26: Added support for Ubuntu 11.04+ which uses slightly different FTP folder names

Lack of FTP keepalive functionality in Nautilus has been one of my biggest gripes in Ubuntu for a long time now. It’s infuriating attempting to open a folder only to discover the session has timed out and I need to reconnect. Well that problem is now solved!

Run the following bash script in the background each time you boot and you’re good to go:

#!/bin/bash
 
while true
do
	#10.10 and earlier
	ls ~/.gvfs/ftp* &> /dev/null
	#11.04+
	ls ~/.gvfs/FTP* &> /dev/null
	sleep 15
done

Many thanks go to the user who originally posted this script in a mailing list here.

PS. If anyone knows how to integrate this into a nautilus script I’d much appreciate it!

Read More »

Posted (Updated ) in Linux

Setting up chroot jailed FTP access on linux (especially Debian-based distros) is remarkably easy. All you’ll need is proftpd:

sudo apt-get install proftpd

Install as standalone (the default option) and once complete, make sure /bin/false is in your shells list – if not, add it:

sudo nano /etc/shells

Set up the FTP account with desired chroot:

sudo useradd <user> -p <password> -d /path/to/chroot -s /bin/false

By this point you’ll have a working FTP account but no chroot. Let’s add that now. In /etc/proftpd/proftpd.conf make sure the following is uncommented:

sudo passwd <user>

Restart proftpd service and you’re good to go:

DefaultRoot			~

Thanks to frodon of the Ubuntu Forums for his tutorial found here.

Read More »

Posted (Updated ) in Linux

Update 2011-10-30: Added instructions for Ubuntu 11.04+

An issue has crept up in the latest version of Ubuntu (10.10 as of writing) whereby installing beta versions of Firefox causes the browser to become the default application for FTP addresses. This is a real annoying development that I’m sure alot of you have a beef with. There’s a very simple fix to change it back to trusty ol’ nautilus:

Open ~/.gconf/desktop/gnome/url-handlers/ftp/%gconf.xml and change the stringvalue link to/usr/bin/nautilus like so:

<?xml version="1.0"?>
<gconf>
	<entry name="needs_terminal" mtime="1287534317" type="bool" value="false"/>
 
	<entry name="enabled" mtime="1287534317" type="bool" value="true"/>
	<entry name="command" mtime="1287534317" type="string">
 
		<stringvalue>/usr/bin/nautilus</stringvalue>
	</entry>
</gconf>

In 11.04+, you’ll also need to open ~/.local/share/applications/mimeapps.list and under [Default Applications] add:

x-scheme-handler/ftp=nautilus.desktop

Courtesy of radu cotescu.

Read More »