Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getdents does not list . and .. files on squashfuse-mounted filesystems #133

Open
DrDaveD opened this issue Apr 11, 2024 · 3 comments · May be fixed by #139
Open

getdents does not list . and .. files on squashfuse-mounted filesystems #133

DrDaveD opened this issue Apr 11, 2024 · 3 comments · May be fixed by #139

Comments

@DrDaveD
Copy link
Collaborator

DrDaveD commented Apr 11, 2024

squashfuse-mounted file systems do not have . and .. files show up from getdents() calls, as is the case with most filesystem mounts including those mounted by the kernel squashfs.

To reproduce:

$ mkdir -p d/d1 mnt
$ touch d/d1/.dotfile
$ mksquashfs d d.squashfs
$ squashfuse d.squashfs mnt
$ ls -a mnt/d1
.dotfile
$ fusermount -u mnt
$ sudo mount -t squashfs d.squashfs mnt
$ ls -a mnt/d1
.  ..  .dotfile
$ sudo umount mnt

In a lot of cases this probably doesn't matter, but it does in some. For example it can cause kinit to crash, see apptainer/apptainer#2143.

@vasi
Copy link
Owner

vasi commented Apr 12, 2024

Can we compare to the behavior of other FUSE filesystems?

@DrDaveD
Copy link
Collaborator Author

DrDaveD commented Apr 12, 2024

Certainly fuse2fs includes them:

$ mkfs.ext3 -d d/ d.ext3 1M
$ fuse2fs d.ext3 mnt
$ ls -a mnt/d1
.  ..  .dotfile

@mgord9518
Copy link
Contributor

@vasi This libfuse example also does it

@DrDaveD DrDaveD linked a pull request Oct 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants