TIP Fix NTFS Permissions

From Gentoo Linux Wiki

Jump to: navigation, search
This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other
Wikipedia has an article on:

Whenever you copy anything from an NTFS mounted filesystem to a non-NTFS fs, the permissions on all the files will be +x. Here is an alias you can use to scan from the directory you're in, and recursively reset the file permissions.

 # alias fixntfs='find . -type f -print0 | xargs -0 chmod -x'

slightly faster might be this:

 # alias fixntfs='chmod -R 644 *; find . -type d -exec chmod 755 {} \;'

You can also mount NTFS drive without +x permissions.

File: /etc/fstab
/dev/hda5  /mnt/c  ntfs  user,ro,umask=0133,dmask=000  0 0
Personal tools
In other languages