rsync transfer failed: File name too long (36)

Bug #592303 reported by Andrew M.
76
This bug affects 16 people
Affects Status Importance Assigned to Milestone
rsync
New
Undecided
Unassigned
rsync (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: rsync

Trying to rsync my encrypted home folder to another ubuntu machine (with exactly the same release and package version of rsync). Most transfers succeed, but occasionally I see:

rsync: recv_generator: mkdir "/mnt/backupuuid/mnt/home/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1O4rDGDN9cc6pEme5GOKs67U--/ECRYPTFS_FNEK_ENCRYPTED.FXYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1Oj3Vo5jUgBfJ.o-NKs.75Rbf3tBnbdAGWQ29J2e5laBE-/ECRYPTFS_FNEK_ENCRYPTED.FWYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1OnAMGEJ-0sE.Yiwc37kTNQk--/ECRYPTFS_FNEK_ENCRYPTED.FbYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1OwVHHPKxU7rcIFxmidLe3rp8pLAFfEgvTPilQAb4uRdmqWVGPNC9iGn5.W-fCXDmqHBnVSSWE2Nuj6l6JAUSwwOjvStnWm3f2u1mp4iaKbgmNHIlyr7wCHIS.CHnK-H.E" failed: File name too long (36)
*** Skipping any contents from this failed directory ***

~ $ lsb_release -rd ; apt-cache policy rsync
Description: Ubuntu 10.04 LTS
Release: 10.04
rsync:
  Installed: 3.0.7-1ubuntu1
  Candidate: 3.0.7-1ubuntu1
  Version table:
 *** 3.0.7-1ubuntu1 0
        500 http://software.linux.ibm.com/pub/ubuntu-repository/ lucid/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

What's the filesystem you are backing up to?
It's got to be said that is a very long filename - but it doesn't seem to be greater than
any limits I can find; most seem to be 255 for the length of any name in a filesystem, and at least 1024 for the whole length.

Dave

Revision history for this message
Andrew M. (ender-neo) wrote :

from: ext4
to: encfs sitting on an ext4 filesystem

i've attached the encfs xml file - perhaps this is really an encfs bug?

Revision history for this message
Andrew M. (ender-neo) wrote :

from the destination machine:

apt-cache policy encfs
encfs:
  Installed: 1.5.2-2
  Candidate: 1.5.2-2
  Version table:
 *** 1.5.2-2 0
        500 http://mirror.anl.gov/pub/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

I did a test using mkdir and a 966 char long path name on the destination machine. Everything worked fine when I issued these commands:

backup@hoshira:/mnt/backupuuid/mnt$ sudo mkdir -p "test/thisisanextremelylongpathname1/thisisanextremelylongpathname2/thisisanextremelylongpathname3/thisisanextremelylongpathname4/thisisanextremelylongpathname5/thisisanextremelylongpathname6/thisisanextremelylongpathname7/thisisanextremelylongpathname8/thisisanextremelylongpathname9/thisisanextremelylongpathname0/thisisanextremelylongpathname1/thisisanextremelylongpathname2/thisisanextremelylongpathname3/thisisanextremelylongpathname4/thisisanextremelylongpathname5/thisisanextremelylongpathname6/thisisanextremelylongpathname7/thisisanextremelylongpathname8/thisisanextremelylongpathname9/thisisanextremelylongpathname0/thisisanextremelylongpathname1/thisisanextremelylongpathname2/thisisanextremelylongpathname3/thisisanextremelylongpathname4/thisisanextremelylongpathname5/thisisanextremelylongpathname6/thisisanextremelylongpathname7/thisisanextremelylongpathname8/thisisanextremelylongpathname9/thisisanextremelylongpathname0/thisisanextremelylongpathnameN"
backup@hoshira:/mnt/backupuuid/mnt$ echo $?
0

Revision history for this message
Andrew M. (ender-neo) wrote :

ok, this doesn't look like rsync's fault at all

I issued the following command on the destination machine directly, and it threw up.
backup@hoshira:~$ sudo mkdir -p "/mnt/backupuuid/mnt/test/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1O4rDGDN9cc6pEme5GOKs67U--/ECRYPTFS_FNEK_ENCRYPTED.FXYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1Oj3Vo5jUgBfJ.o-NKs.75Rbf3tBnbdAGWQ29J2e5laBE-/ECRYPTFS_FNEK_ENCRYPTED.FWYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1OnAMGEJ-0sE.Yiwc37kTNQk--/ECRYPTFS_FNEK_ENCRYPTED.FbYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1OwVHHPKxU7rcIFxmidLe3rp8pLAFfEgvTPilQAb4uRdmqWVGPNC9iGn5.W-fCXDmqHBnVSSWE2Nuj6l6JAUSwwOjvStnWm3f2u1mp4iaKbgmNHIlyr7wCHIS.CHnK-H.E"
mkdir: cannot create directory `/mnt/backupuuid/mnt/test/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1O4rDGDN9cc6pEme5GOKs67U--/ECRYPTFS_FNEK_ENCRYPTED.FXYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1Oj3Vo5jUgBfJ.o-NKs.75Rbf3tBnbdAGWQ29J2e5laBE-/ECRYPTFS_FNEK_ENCRYPTED.FWYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1OnAMGEJ-0sE.Yiwc37kTNQk--/ECRYPTFS_FNEK_ENCRYPTED.FbYZkOJAsGSXo-S.cpRFq3wvU.Dtozd29e1OwVHHPKxU7rcIFxmidLe3rp8pLAFfEgvTPilQAb4uRdmqWVGPNC9iGn5.W-fCXDmqHBnVSSWE2Nuj6l6JAUSwwOjvStnWm3f2u1mp4iaKbgmNHIlyr7wCHIS.CHnK-H.E': File name too long

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Hi Andrew,
  I've marked this as a dupe of #344878 which is problems with ecryptfs's filename lengths

Dave

Revision history for this message
Tyler Hicks (tyhicks) wrote :

David - I don't believe this is a dup of bug #344878. IIUC, Andrew is backing up a file, which happens to have an eCryptfs encrypted file name, to an encfs mount point on the destination machine. The destination machine, using encfs is the one reporting ENAMTOOLONG... right Andrew?

Revision history for this message
Andrew M. (ender-neo) wrote :

That's correct - the destination is an encfs filesystem sitting on an ext4 drive.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in rsync (Ubuntu):
status: New → Confirmed
Revision history for this message
Ulli Horlacher (framstag) wrote :

This bug is still there in Ubuntu 12.04:

framstag@diaspora:/mnt/usb/UB3: rsync -avH --delete audio /data/encfs/moep/
sending incremental file list
audio/_Weihnachten/
audio/_Weihnachten/Alice\#240Cooper\#240&\#240Ronnie\#240James\#240Dio\#240&\#240Tony\#240Iommy\#240&\#240Lemmy\#240Kilmister\#240&\#240Steve\#240Lukather\#240&\#240George\#240Lynch\#240&\#240Steve\#240Morse\#240&\#240Tommy\#240Shaw\#240&\#240Geoff\#240Tate:We\#240wish\#240you\#240a\#240Merry\#240Christmas\#240and\#240a\#240Happy\#240New\#240Year.mp3
rsync: mkstemp "/data/encfs/moep/audio/_Weihnachten/.Alice\#240Cooper\#240&\#240Ronnie\#240James\#240Dio\#240&\#240Tony\#240Iommy\#240&\#240Lemmy\#240Kilmister\#240&\#240Steve\#240Lukather\#240&\#240George\#240Lynch\#240&\#240Steve\#240Morse\#240&\#240Tommy\#240Shaw\#240&\#240Geoff\#240Tate:We\#240wish\#240you\#240a\#240Merry\#240Christmas\#240and\#240a\#240Happy\#240New\#240Year.mp3.FOqgLQ" failed: File name too long (36)

sent 8406919 bytes received 1911 bytes 3363532.00 bytes/sec
total size is 114076271491 speedup is 13566.25
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]

Whereas cp has no problem with this file:

framstag@diaspora:/mnt/usb/UB3: cp -av audio/_Weihnachten/Alice Cooper \& Ronnie James Dio \& Tony Iommy \& Lemmy Kilmister \& Steve Lukather \& George Lynch \& Steve Morse \& Tommy Shaw \& Geoff Tate\:We wish you a Merry Christmappy New Year.mp3 /data/encfs/moep/audio/_Weihnachten/
`audio/_Weihnachten/Alice\240Cooper\240&\240Ronnie\240James\240Dio\240&\240Tony\240Iommy\240&\240Lemmy\240Kilmister\240&\240Steve\240Lukather\240&\240George\240Lynch\240&\240Steve\240Morse\240&\240Tommy\240Shaw\240&\240Geoff\240Tate:We\240wish\240you\240a\240Merry\240Christmas\240and\240a\240Happy\240New\240Year.mp3' -> `/data/encfs/moep/audio/_Weihnachten/Alice\240Cooper\240&\240Ronnie\240James\240Dio\240&\240Tony\240Iommy\240&\240Lemmy\240Kilmister\240&\240Steve\240Lukather\240&\240George\240Lynch\240&\240Steve\240Morse\240&\240Tommy\240Shaw\240&\240Geoff\240Tate:We\240wish\240you\240a\240Merry\240Christmas\240and\240a\240Happy\240New\240Year.mp3'
framstag@diaspora:/mnt/usb/UB3: echo $?
0

framstag@diaspora:/mnt/usb/UB3: lsb_release -d
Description: Ubuntu 12.04.5 LTS

framstag@diaspora:/mnt/usb/UB3: mount | grep UB3
/dev/sdc1 on /mnt/usb/UB3 type ext4 (rw,noexec,nosuid,nodev,noatime,nodiratime)

framstag@diaspora:/mnt/usb/UB3: mount | grep encfs
encfs on /data/encfs type fuse.encfs (rw,nosuid,nodev,default_permissions,user=framstag)

Revision history for this message
Ulli Horlacher (framstag) wrote :

Sorry, I have overlookedf the hint
"this bug report is a duplicate of bug #344878."

Revision history for this message
Trickhere (sabbiryellow) wrote :

Anyone used “Long Path Tool” !!

Revision history for this message
Damien barifon (shahzadi-kohkaf) wrote :

Try to long path tool. It is very helpful.

Revision history for this message
robertvo (navisakhti123) wrote :

I found this problem before but i have fixed this easily. There are many tool available for long path error. I have used Long path tool and it works great. You can try it. It is easy to fix this error using this tool.

Revision history for this message
macho (macho) wrote :

Can someone please post a link to Long Path Tool? The only thing I find with that name is a Windows utility.

Revision history for this message
Frank (frank1982) wrote :

Try Long Path Tool as it can remove any problems that you might have.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.