[Libguestfs] guestmount issue with change directory (cd)

Pierre Neyron pierre.neyron at imag.fr
Fri Oct 14 17:25:42 UTC 2016


Hello,

I've got a strange behavior with guestmount: I've a root directory with
mod/owner = drwx------ root root. I cannot change directory to it as a
regular user (as normal), but I can list its content (not normally
normal) and I can change directory to a subdirectory in it which is mod
drwxr-xr-x.

E.g:
$ mkdir /tmp/mnt
$ guestmount --ro -i -a test.qcow2 /tmp/mnt/
$ cd /tmp/mnt
$ ls -ld root/
drwx------ 4 root root 4096 Oct 14 19:21 root/
$ ls -l root/
total 4
drwxr-xr-x 2 root root 4096 Oct 14 19:21 subdir
$ cd root
bash: cd: root: Permission denied
$ cd root/subdir
$ pwd
/tmp/mnt/root/subdir

Also tar is ok as well:
$ cd /tmp/mnt
$ tar cf /tmp/tar.tar .
$ tar tf /tmp/tar.tar | grep -e "^./root/subdir/$"
./root/subdir/

This is for sure some fuse magic to allow the regular user to list files
just as if he is root (after all, guestmount did not require to be root
in the first place). I'm very ok with that since this is very useful,
but then I would expect `cd root' to be OK as well ?

I'm using
$ guestmount -V
guestmount 1.32.7

Best regards,

PS: @moderators: sorry for the noise with cancelled messages, I fixed
typos... :/
-- 
Pierre




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2959 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20161014/d462fc4f/attachment.p7s>


More information about the Libguestfs mailing list