eCryptfs file name maximum length is shorter than in ext3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ecryptfs-utils (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The situation is easy: I decided to encrypt my new hdd. I downloaded Ubuntu 9.04 alternate install CD and chosed encrypted LVM at partitioning. (I did not have the option to use a key file, I had to enter a passpharse which can be another bug.)
After all I started to copy data from my old ext3 file system to the new LVM. (Digression. Copying Linux files are not easy because of the permissions. If I copy them with root user all destination files will be root. If I set the option to preserwe owner, the owner will be the old user. But I started to use a new user name! So the only way to copy is to mount the old volume with the new user, and if there are files with root owner, then do something. I'm not on this point yet. Because... read the next paragraph! At least there are the command 'dd' but this is the only thing which makes copying volumes better in Linux than Windows.)
But! Some files couldn't be copied. I have got the error: File name too long (36). I was wondering, I was using a newer file system, LVM. Then I started to look after it and I was shocked: the maximum file name size in Linux is 256 charachters. (And only in ext3, in LVM it seems to be shorter.) At least it is 1 more longer than in Windows: http://
So I made some experiements, here the results. Enjoy!
LVM:
$ touch 1______
touch: cannot touch `1_____
ext3:
$ touch 1______
$ ls 1*
1______
~$ touch "This is a very long file name. Linux can not handle it, which reminds me the old DOS operating system with file name size 8 characters and 3 characters exestion. Or it reminds me the wonderful Turbo Pascal 6.0 with maximum string size 255. But sometimes we have file names more than 256 characters."
touch: "This is a very long file name. Linux can not handle it, which reminds me the old DOS operating system with file name size 8 characters and 3 characters exestion. Or it reminds me the wonderful Turbo Pascal 6.0 with maximum string size 255. But sometimes we have file names more than 256 characters." elérése sikertelen: A fájlnév túl hosszú
(The meaning of the last words: acces unsuccesful: The file name is too long. Sorry, I couldn't made Linux to speak English, there is a prefix for it. Does somebody know it?)
affects: | ubuntu → ecryptfs-utils (Ubuntu) |
Changed in ecryptfs-utils (Ubuntu): | |
status: | Incomplete → New |
summary: |
- LVM file name maximum length is shorter than in ext3 + eCryptfs file name maximum length is shorter than in ext3 |
Hi, you're right that ext3 has a limited filename size at 255 bytes - it depends on what character encoding you use how many characters that implies, but at most 255. In your example with only underscores and numbers I think you should be able to fit 255. It works for me.
LVM is not a file system, but rather a modern partitioning model. Inside a logical volume, you would still set up a file system, like ext3. So... my first guess is that perhaps the installer selected something other than ext3 for the file system in your LVM test.
Could you check what file system is in use? One quick way to do this is to look at the output of "df -T" (see the man page for details).