NTFS Hidden files not visible in Kernel 2.2.23?
Subsystems (2)
Hello,
I have built a Linux 2.2.23 kernel with NTFS support built-in. If I mount an NTFS partition (created by Windows 2000) read-only, I can see all regular files but any that have the "Hidden" attribute set by Windows are not visible when using "ls" or "find". If I go to the directory where the file is located and know the filename, I can "cp" the file to another location (ie: writable partition) where it then becomes visible in the new location.
In the 2.4.20 kernel, when I mount an NTFS partition I can see all the hidden files without any problems. I need to continue to use the 2.2.x kernel for space constraints and other reasons so is this a bug in the 2.2.x NTFS driver or is there a configuration option somewhere or other method that would allow me to see hidden files on NTFS drives?
Thanks in advance,
Jeff.
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
Quoted 7 lines · Jeff Gilchrist
I have built a Linux 2.2.23 kernel with NTFS support built-in. If I mount an NTFS partition (created by Windows 2000) read-only, I can see all regular files but any that have the "Hidden" attribute set by Windows are not visible when using "ls" or "find". If I go to the directory where the file is located and know the filename, I can "cp" the file to another location (ie: writable partition) where it then becomes visible in the new location.
Quoted 5 lines
In the 2.4.20 kernel, when I mount an NTFS partition I can see all the hidden files without any problems. I need to continue to use the 2.2.x kernel for space constraints and other reasons so is this a bug in the 2.2.x NTFS driver or is there a configuration option somewhere or other method that would allow me to see hidden files on NTFS drives?
It is not a bug. This is how the old driver was designed. During 2.4.x development I removed this "feature" so that all hidden files would be shown, too. It doesn't make any sense to me not to show them.
The best way around this is to apply this patch to the 2.2.24 kernel source:
fs/ntfs/fs.c renamed from fs/ntfs/fs.c.old +0 -6
@@ -144,7 +144,6 @@ static int ntfs_printcb(ntfs_u8 *entry,v {struct ntfs_filldir * nf=param;int flags=NTFS_GETU8 (entry+0x51 ); -int show_hidden=0 ;int length=NTFS_GETU8 (entry+0x50 );int inum=NTFS_GETU32 (entry);int error;
@@ -169,13 +168,8 @@ static int ntfs_printcb(ntfs_u8 *entry,vcase ngt_posix:break ;case ngt_full: - show_hidden=1 ;break ; } -if (!show_hidden && ((NTFS_GETU8 (entry+0x48 ) &2 )==2 )){ -ntfs_debug (DEBUG_OTHER ,"Skipping hidden file\n" ); -return 0 ; - } nf->name=0 ;if (ntfs_encodeuni (NTFS_INO2VOL (nf->dir),(ntfs_u16 *)(entry+0x52 ), length,&nf->name,&nf->namelen)){
Best regards,
Anton
Signature · 3 lines
Anton Altaparmakov <aia21 at cantab.net> (replace at with @) Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/