Accessing Ubuntu One file storage via FTP from any OS
Recently, James Henstridge from my team at Ubuntu One released u1ftp, a simple app to provide FTP access to Ubuntu One. It’s deliberately designed so that it works across platforms; whether you’re on Windows or OS X or Ubuntu or Kubuntu or Fedora or whatever, it should work for you, so you can access your Ubuntu One storage via FTP, and therefore if you want to you can mount your U1 storage as a drive in your file manager.
As James says, just download u1ftp-0.1.zip
from https://launchpad.net/u1ftp/+download, and then run it with python u1ftp-0.1.zip
, on any platform*. (You don’t need to unzip it!)
You can then use your file manager, or a dedicated FTP client, to connect to localhost
, port 2121
, log in with your Ubuntu One username and password, and then you have your Ubuntu One storage right there. This should be useful if you don’t have Ubuntu One set up on a particular machine or if it’s not yet available on that machine, for headless servers, for copying lots of files into and out of Ubuntu One all in one go; let us know what you’re doing with it!
u1ftp on Ubuntu
u1ftp on Fedora
u1ftp on Windows
u1ftp on Mac OS X
u1ftp on a headless Linux server
$ sudo apt-get install curlftpfs # or install your own way
# it installs...
$ wget https://launchpad.net/u1ftp/trunk/0.1/+download/u1ftp-0.1.zip
--2012-07-17 13:01:10-- https://launchpad.net/u1ftp/trunk/0.1/+download/u1ftp-0.1.zip
HTTP request sent, awaiting response... 200 OK
Length: 289783 (283K) [application/zip]
Saving to: `u1ftp-0.1.zip'
2012-07-17 13:01:11 (1.08 MB/s) - `u1ftp-0.1.zip' saved [289783/289783]
$ python u1ftp-0.1.zip
Listening on ftp://127.0.0.1:2121/
# in a different terminal, mount your U1 storage in a folder...
$ mkdir u1storage
$ curlftpfs ftp://my.u1.email%40address:myU1password@localhost:2121/ u1storage/
# or use netrc(5) to keep password secret
# you may be asked to create and enter a keyring password in the u1ftp terminal
$ ls u1storage/
deja-dup_faith Music_Audiobooks Pictures - Nexus S
Documents Music_Everything Purchased Music
Scratch Thunderbird Attachments
Sent to Ubuntu One Ubuntu One
# do whatever you want with your U1 storage...
$ fusermount -u u1storage/ # unmount the folder
20 thoughts on “Accessing Ubuntu One file storage via FTP from any OS”
So you keep saying “FTP”. Is this the traditional FTP which is unencrypted? If so, this means that U1 users are sending their creds across the interwebs unencrypted. Not to mention the files you are moving around.
Chuck: the ftp server runs *on your local computer*. The connection *from* the FTP server to Ubuntu One is using the U1 files API, over HTTPS, and so is encrypted.
@Stuart: But you would still have to log into your local machine would still be unencrypted. A partially unencrypted pipe is still unencrypted.
I could only see this being a non-issue if the u1FTP client is running in your LAN and you are only connecting to it within your trusted LAN, or over an SSH tunnel or some other encyrpted VPN.
maxolasersquad: connections on localhost do not travel across the network at all. If someone has the ability to read localhost connections, your machine is already owned. You can, of course, also run on your LAN and connect to it over an SSH tunnel.
This sounds awesome! Just to clarify, the point of it is so that, say you’re on a Windows computer and can’t install anything on it, you could run a “portable” FTP client and still access your files, right? (and then you could download/upload as needed)
Nice! Basically it’s a local proxy. Since it’s very straightforward and pure-python, maybe you should think about compiling it as a portable executable for the most popular architectures (win32/64, mac), where installing Python can be a problem.
raptorak: exactly!
GiacomoL: macs come with Python. A Windows exe would be nice, indeed
This is a really good idea. I can get behind having a FTP-to-U1 connection. Especially for other distributions and headless servers where the U1 client tends not to work (or requires some tweaking to get working).
Tried out u1ftp and, on my desktop machine, it worked really well. Connected fine, everything went okay. Tried it on Ubuntu Server (which is CLI only) and ran into some problems. U1ftp can connect, but it kept prompting me for a my keyring password. Every time it wanted to access a file or copy something to/from the Ubuntu One servers it would first prompt me for my keyring password and there didn’t appear to be any way to leave the password blank or have U1ftp remember it.
Right now U1ftp looks really promising, especially for other Linux desktop distros. Needs a little polish to be a good command line tool though, in my opinion. Hopefully version 0.2 will round out the edges, because this package shows a lot of promise.
Jesse, I don’t think you should be being prompted every time; merely on u1ftp startup. Can you elaborate a bit? (By email to stuart-dot-langridge-at-canonical-dot-com if that’s easier.)
Hi,
Would this option work with sharing files. I have an Ubuntu One account and I want my guests, which I give access to, to be able to sync a file, or files, stored on their FTP sites with Ubuntu One. It would be great if I could simply send them a message and they could install an option that would connect with their FTP site. I want them to feel secure that I would have no access to anything else on their server and would only be accessing the sync file via Unbuntu One.
If you need further clarification, please let me know.
Thank you in advnace for any information you can offer.
Paul.
Paul: I’m afraid not. This program makes Ubuntu One appear to *be* an FTP server; it doesn’t link Ubuntu One with *existing* FTP servers.
So, in essence, any file updated on an ftp site would then have to be migrated to a system that has an Ubuntu One account in order for it to remain synced?
Thanks again,
Paul
Paul: if your guests install Ubuntu One, then you and they can share specific folders around, and changes made by either of you will be seen by the other — and they get more space to store things in their personal cloud as well
Hi,
Thank you for your reply.
I am using Ubuntu One in the capacity you have described. It is just that some files I want to share and sync will exist in a few locations. Some on local drives, some on FTP sites. I was hoping to find a way to handle this all within Ubuntu One. Still a great tool none the less.
Paul
thanks for this.
i can connect and mount the drive in my centos 6.3 server fine.. when i attempt to write to the ubuntu one folder – create a folder or write a file – i see ‘operation not permitted’..
i looked at permissions and didn’t see any way to change what is occurring. any ideas?
ura: that’s strange, and obviously isn’t supposed to happen I can’t replicate it here, though; how are you writing to the folder? From the command-line ftp client, or by mounting the ftp folder with something like curlftpfs? Does it work if you start u1ftp and then connect to it with a dedicated ftp client?
I could’nt get it to work on a Slackware machine.
I get a console error:
— —
File “u1ftp-0.1.zip/twisted/internet/defer.py”, line 1039, in _inlineCallbacks
File “u1ftp-0.1.zip/u1ftp/portal.py”, line 90, in requestAvatarId
File “u1ftp-0.1.zip/keyring/core.py”, line 34, in get_password
File “u1ftp-0.1.zip/keyring/backend.py”, line 240, in get_password
exceptions.AttributeError: ‘NoneType’ object has no attribute ‘keyDoesNotExist’
and a 550 FTP error. I’m using the same login from the Ubuntu One site.
Did anyone have something similar?
Sorry to hear that. I don’t know what might be causing it; perhaps jamesh will comment with thoughts?
this looks very useful, but following the news today that the US authorities can access any cloud based strage in the US as long as it’s owned by foreign nationals, I’d be happier if encrypted files could be accessed in the same way.