2

The windows drives are mounted at boot-time using pysdm. The setting were

nls=iso8859-1,users,umask=002,sync,user,dirsync,uid=mtk

When I try to change the permission of files using chmod, I don't see any update in the permissions. Chmod quietly returns the prompt. Also the permission of created files must have been 755 instead of 775. Here is the output of terminal.

mtk@mtk-laptop$ umask
0022
mtk@mtk-laptop$ touch abc.txt
mtk@mtk-laptop$ ls -l abc.txt 
-rwxrwxr-x 1 mtk root 0 May 14 00:00 abc.txt*
mtk@mtk-laptop$ chmod ugo-x abc.txt 
mtk@mtk-laptop$ ls -l abc.txt 
-rwxrwxr-x 1 mtk root 0 May 14 00:00 abc.txt*
mtk@mtk-laptop$ 

Does anyone know what is the issue behind this?

I am using ubuntu 12.04.

  • The filesystem is NTFS. – mtk May 13 '12 at 18:45
5

Unix permissions don't apply to and can't be mapped to Windows permissions, so chmod is necessarily a no-op. (FAT doesn't have permissions at that granularity, and NTFS permissions are stored not by username or numeric ID but by a UUID that Linux has no access to.) The permissions you see are manufactured by the umask=002 part of the mount options.

  • 1
    Ok, I get the point. But in that case 'chmod' or 'umask' should have returned some message :). Thanks for the response. – mtk May 13 '12 at 18:45
  • 1
    umask won't return any message; it changes a setting associated with your process, it doesn't affect any files anywhere, and its runtime action is to silently modify an open(..., O_CREAT), with no way for anything to report an error specific to that modifiction. Whether chmod should report an error is arguable; the Linux developers decided it should not, since otherwise many programs would throw pointless errors when applied to files in Windows filesystems. – geekosaur May 13 '12 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.