svn working copy inside ecryptfs file name gotcha

Written by James McDonald

May 19, 2009

So encrypting your stuff is wise from a security standpoint. Yes?

Here is a little problem I ran into when I copied my svn working copy into an ecryptfs directory. The actual copy operation gave an error message about “file name too long” which I ignored. But then I tried to do an svn update and the error as below appeared

user@linuxbox:~/Private/svn/work/company/docs$ svn update
A DR
svn: Can't check path 'DR/Disaster recovery of a Local Windows 2000 or Windows 2003 computer (includes non-authoritative restore of Active Directory for a domain controller).mht': File name too long

Tried all sorts of things to fix this ended up moving the working copy out of the encrypted directory and then running svn to rename, commit, update before moving it back into the encrypted directory

svn mv "Disaster recovery of a Local Windows 2000 or Windows 2003 computer (includes non-authoritative restore of Active Directory for a domain controller).mht" ashortnamehere.mht
svn commit -m "renamed too long a file name"

It appears ecryptfs has a file name length limit. I don’t know the exact restriction but the above file name is 151 characters long and it’s too long.

4 Comments

  1. Conor

    Well, this explains it. Just set up an encrypted home directory and was running into this problem for the first time ever. Thanks for the explanation!

    Reply
  2. Conor

    Any progress on this front? Still running into the same problem.

    Reply
  3. Conor

    From the eCryptfs page on Ubuntu Community:

    Linux filenames are limited to 256 characters in length. When using eCryptfs encrypted filenames, filenames are padded with metadata necessary for decryption. Cleartext filenames which are already very long (> ~200 characters) will not work in eCryptfs.

    Reply
  4. SteveAD

    For such problems, Long Path Tool works good.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…