D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] fstab and mounting ntfs partitions from debian...

 

On Sunday 23 January 2005 2:09 pm, Anton Channing wrote:
Any suggestions?  I don't actually understand the umask=022

umask sets the default permissions by subtracting the mask from the maximum. 
777 is maximum for directories: it gives directory / executable rights, plus 
read and write:

1 - execute / change into this directory - x
2 - write - w
4 - read only -r

You add the numbers together to get the permission value.

So:
-rw-r--r-- is a common default for user files. It's 644, it allows the user to 
read and write, others only to read.

drwxr-xr-x is common for directories. The d indicates directory, the user can 
read, list/change into and write (delete / create new files) in the 
directory. Others can only read and cd. This is 755.

-rwx-r-xr-x is a possible value for user scripts when you don't want to have 
to specify bash or perl in front, just ./scriptname

So for directories: 777 - 022 gives 755
The maximum for files is taken from 666 (executable files not being a 
default), so 022 gives 644.

umask 022 therefore sets files to 644 and directories to 755 - the usual 
default for user space.

bit, just copied it from a website where someone said they
achieved what I'm attempting by replacing 'noauto' with
'umask=022'

However, this doesn't answer the original point - you saw this on a website 
that said to replace noauto with umask? The two are completely different. 
noauto means that it won't be mounted by default at system start up. You will 
have to mount it yourself later. Usually, that's best done by adding user to 
the noauto command and is used for CDROM's, USB sticks and other removable 
media that might not be there at boot. You can also use it if that partition 
is optional - no system files are stored there, nothing that is needed to 
start the system or login the user.

in those two lines.

Always try to understand what these options do before taking it to heart!

-- 

Neil Williams
=============
http://www.dcglug.org.uk/
http://www.nosoftwarepatents.com/
http://sourceforge.net/projects/isbnsearch/
http://www.williamsleesmill.me.uk/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

Attachment: pgp00062.pgp
Description: PGP signature