Closed lechner closed 4 months ago
They should check a different way.
Let's assume this:
$ ls -l
total 0
drwxr-xr-x. 2 jakob jakob 80 28. Mai 21:07 cipher
drwxr-xr-x. 2 jakob jakob 80 28. Mai 21:07 mnt
-rw-r--r--. 1 jakob jakob 0 28. Mai 21:12 somefile
Become root and we get:
# ls -l
ls: cannot access 'mnt': Permission denied
total 0
drwxr-xr-x. 2 jakob jakob 80 28. Mai 21:07 cipher
d?????????? ? ? ? ? ? mnt
-rw-r--r--. 1 jakob jakob 0 28. Mai 21:12 somefile
Note that ls
still knows that it's a directory as indicated by the d in front.
In other words, guix could read the containing directory.
2nd idea: Use "stat mnt/.":
# stat mnt/.
stat: cannot statx 'mnt/.': Permission denied
# stat somefile/.
stat: cannot statx 'somefile/.': Not a directory
# stat doesnotexist/.
stat: cannot statx 'doesnotexist/.': No such file or directory
If you get "Permission denied", then mnt
is a directory.
Hi,
This is probably a FUSE question, but I couldn't think of a better place:
I mount Gocryptfs volumes with the default FUSE options. The
root
user cannot look inside. My OS, however, insists on creating the mount point unless it exists. They usestat
to check, which fails. Is that a bug in GNU Guile'sstat
, or should my OS check in a different way?Thank you!
Kind regards Felix