LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   umask makes no sense (https://www.linuxquestions.org/questions/linux-software-2/umask-makes-no-sense-110663/)

shanenin 10-30-2003 09:33 PM

umask makes no sense
 
I have been trying to understand umask, it is confusing me. If I put this entry in my fstab I get this result

/dev/hda2 /mnt/ntfs ntfs umask=000,noauto,user 1 0
this gives me a permission of 555 for the directory /mnt/ntfs

/dev/hda2 /mnt/ntfs ntfs umask=111,noauto,user 1 0
it gives me thes results with this line, permission 0f 400. why would it not be 444

I am baseing my logic on this, wouldn't each of the ones in umask=111 minus from each of the fives(the permission with umask=000)


I am lost? any help understanding would be appreciated.

forgive me about this question. I can not seem to write anything that sounds clear and consise tonight.

Nightblade_oz 10-30-2003 11:00 PM

I think you need four digits, i.e. 0111 The math is like ( 7 - mask ) = permissions, so that example should give you 666 permisions.

Nightblade_oz 10-30-2003 11:08 PM

Oh, and be very careful with ntfs mounts under linux...

andrewlkho 10-31-2003 02:58 AM

Yes, be *very* careful, because if you try to write to an ntfs partition, it'll most likely corrupt that partition.
As for umask, IIRC it's not necessary to have four digits, you can just have three [although the last one's the sticky one].


All times are GMT -5. The time now is 05:53 PM.