Closed modten closed 7 months ago
The POSIX error code for "File name too long" is ENAMETOOLONG
. This error code is nowhere to be found in mount-zip
's code (see here). And I'm not aware of any code path in mount-zip
that would allow it to return this error code via its FUSE interface.
So, which layer of your software stack is actually returning the error? This is not clear to me.
Can you see this error being returned or logged by mount-zip
when it is run in foreground mode with the -f
option?
Hi @fdegros , thanks for your reply. I can now reproduce the issue on my archlinux pc. mount-zip
has no returned error.
> ~/mount-zip > mount-zip --version
mount-zip version: 1.0.6
libzip version: 1.10.1
FUSE library version: 2.9.9
fusermount version: 2.9.9
using FUSE kernel interface version 7.19
> ~/mount-zip > mount-zip -o allow_other a.zip ./mount/a
> ~/mount-zip > mount-zip -o allow_other b.zip ./mount/b
> ~/mount-zip > ls -l ./mount/a
总计 1
-rw-r--r-- 1 root root 2 4月24日 20:45 a.txt
> ~/mount-zip > ls -l ./mount/b
总计 1
-rw-r--r-- 1 root root 2 4月24日 20:45 b.txt
> ~/mount-zip > sudo mount -t overlay -o lowerdir=mount/a:mount/b overlay merge
> ~/mount-zip > ls ./merge
a.txt b.txt
> ~/mount-zip > mount-zip --version
mount-zip version: 1.0.12
libzip version: 1.10.1
FUSE library version: 2.9.9
fusermount version: 2.9.9
using FUSE kernel interface version 7.19
> ~/mount-zip > mount-zip -o allow_other a.zip ./mount/a
> ~/mount-zip > mount-zip -o allow_other b.zip ./mount/b
> ~/mount-zip > ls -l ./mount/a ./mount/b
./mount/a:
total 1
-rw-r--r-- 1 root root 2 Apr 24 20:45 a.txt
./mount/b:
total 1
-rw-r--r-- 1 root root 2 Apr 24 20:45 b.txt
> ~/mount-zip > sudo mount -t overlay -o lowerdir=mount/a:mount/b overlay merge
> ~/mount-zip > ls ./merge
ls: reading directory './merge': File name too long
Thanks. I can reproduce the issue.
This seems to be related to the implementation of the statvfs
call. In particular, the field f_namemax
of struct statvfs
is not getting set.
I can confirm that the latest commit has resolved the issue, thanks.
Hi, we use mount-zip to mount multiple zip archives in the almalinux9.3 Docker image, and then use overlayfs to merge the two file directories.
If we set the environment variable PATH to include the directory merged by overlayfs, any shell script starting with
/usr/bin/env
will report aFile name too long
error.I tested multiple versions and found that this problem may have been introduced starting from 1.0.8. Full test records, undocumented versions were not tested:
Since we need to run in the almalinux-micro image, we package all the so files and run mount-zip by specifying LD_LIBRARY_PATH.
Here are the steps to reproduce:
mount-zip script
/usr/local/mount-zip/mount-zip --version