The "-m mask" option alone is useless since we are forced to add the executable bits to browse directories, but these bits make no sense on regular files in NTFS volumes most of the time. Example code taken from src/sys/fs/msdosfs/* and src/sbin/mount_msdosfs/* It was successfully built and tested on 6.2-STABLE and known to patch correctly on -CURRENT. It changes the ABI of the kernel module so any applications that use <fs/ntfs/ntfs.h> & <fs/ntfs/ntfsmount.h> may need to be recompiled. I'm not aware of none (other than mount_ntfs(8), of course). An alternative patch will be posted later that just adds executable bits to every directory, that preserves ABI compatibility. Fix: To apply this patch, run: patch -d /usr < /path/do/patch Now, either rebuild the world and the kernel or run: cd /usr/src/sys/modules/ntfs make clean && make && make install clean cp -f /sys/fs/ntfs/ntfs.h /usr/include/fs/ntfs/ cp -f /sys/fs/ntfs/ntfsmount.h /usr/include/fs/ntfs/ cd /usr/src/sbin/mount_ntfs make clean && make && make install clean kldunload -v ntfs kldload -v ntfs Enjoy, you may use a line like this in /etc/fstab: /dev/ad0s1 /mnt/win ntfs ro,noexec,noatime,-m644,-M755 0 0 Patch attached with submission follows:
This patch adds search permissions to directories on NTFS volumes so you don't need to add them to the "-m mask" option in mount_ntfs(8) since those permissions most likely make no sense on regular files anyway. It preserves ABI compatibility. To apply this patch, run: patch -d /usr < /path/do/patch Now, either rebuild the world and the kernel or run: cd /usr/src/sys/modules/ntfs make clean && make && make install clean kldunload -v ntfs kldload -v ntfs Enjoy, you may now use -m644 in /etc/fstab and still browse directories: /dev/ad0s1 /mnt/win ntfs ro,noexec,noatime,-m644 0 0
This new version of the patch addresses the bug I posted at: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/114856
Responsible Changed From-To: freebsd-bugs->freebsd-fs I think the FS list is a better place for this PR.
Close this pr. 6.2 is so far past EOL as this pr is now meaningless. And ntfs has been removed from 10.0 base see http://svnweb.freebsd.org/base/head/sbin/Makefile?view=log&pathrev=247665
NTFS has been removed from the base system.