Red Hat Bugzilla – Bug 693064
Symbolic links on ntfs-3g are not followed correctly by some commands
Last modified: 2011-10-25 05:34:16 EDT
Description of problem:
[This really a bug or shortcoming in ntfs-3g, and is caused by the
stupid way that symlinks are implemented in NTFS itself. For some
background on this see
Paths that contain elements that are symbolic links are not
followed correctly by some commands. It depends on whether
the command happens to be implemented using a chroot or not.
For a full example see "Steps to reproduce" below.
If /foo is a symbolic link to (say) C:\baz then ntfs-3g rewrites
/foo as a symbolic link to /sysroot//baz (actually incorporating
the mount point in the path itself). This works fine as long
as we don't chroot:
/sysroot/foo/bar -> /sysroot//baz/bar
but if a command does a chroot then it fails:
/foo/bar -> /sysroot//baz/bar ** fail: /sysroot not found **
Version-Release number of selected component (if applicable):
100% on NTFS filesystems, for paths that contain symbolic links.
Steps to Reproduce:
You need a Windows 7 guest to follow these steps, because
on Windows 7, "/Documents and Settings/" is no longer a real
directory, but a symbolic link to /Users/
1. Open the Windows 7 guest image using guestfish:
# guestfish --ro -i -d Win7Guest
><fs> ll "/Documents and Settings"
lrwxrwxrwx 2 root root 60 Jul 14 2009 /sysroot/Documents and Settings -> /sysroot//Users
2. Run 'file' on "/Documents and Settings/Default/NTUSER.DAT". Note
I'm using win:... rewriting in guestfish (see:
><fs> file "win:/Documents and Settings/Default/NTUSER.DAT"
MS Windows registry file, NT/2000 or above
3. Try to download the same file:
><fs> download "win:/Documents and Settings/Default/NTUSER.DAT" /tmp/NTUSER.DAT
libguestfs: error: download: /Documents and Settings/Default/NTUSER.DAT: No such file or directory
All commands should work consistently on NTFS-3g filesystems,
including on paths that contain symbolic links.