1 |
Is this technique of umask=0 safe to use on an NTFS volume? I want to |
2 |
mount an NTFS drive on my desktop so that a regular user can access it. |
3 |
Is there a similar way to mount it with only read permissions, |
4 |
seeing as writing to NTFS drives isn't usually a particularly good idea |
5 |
with Linux. |
6 |
|
7 |
Thanks, |
8 |
Mike Swanson |
9 |
rearden@××××××××××××××.com |
10 |
|
11 |
On Fri, 12 Aug 2005 21:45:44 +0200, Holly Bostick wrote: |
12 |
|
13 |
|
14 |
>>> > Don't you mean umask=0? umask inverts the bits, so 777 gives |
15 |
>>> > --------- to all files. |
16 |
>>> > |
17 |
>>> > |
18 |
> |
19 |
>> |
20 |
>> I'm currently in the middle of an 'argument' with someone else about |
21 |
>> this, so explain, please. |
22 |
>> |
23 |
>> If umask masks bits off of the 'default' permissions, then what is the |
24 |
>> point of umask=000? |
25 |
|
26 |
|
27 |
To give rwxrwxrwx, which is fine for a FAT filesystem, and certainly |
28 |
better than --------- |
29 |
|
30 |
|
31 |
>> It seems that it would leave the permissions as the |
32 |
>> default, which appear to be 755 (is there a creation mask of 022 |
33 |
>> somewhere in the 'default' settings? |
34 |
|
35 |
|
36 |
And there's the rub. Setting permissions to 755 only gives write access |
37 |
to the owner, which is root when mounting at bootup. The other way of |
38 |
dealing with this with FAT filesystems is to use the uid/gid options to |
39 |
set yourself as the user, but that only works on a single user system. |
40 |
|
41 |
|
42 |
>> The other person says that umask=000 removes all restrictions and gives |
43 |
>> all permissions to everybody, but I just don't understand how this |
44 |
>> could be, unless the specific file/mount point was already set that way |
45 |
>> (no file creation mask, so the files are 'created' with the default |
46 |
>> 777/666, or inherited the permission structure of the parent). |
47 |
|
48 |
|
49 |
The mount point is irrelevant, what counts is the permissions on the |
50 |
mounted filesystem, not the parent of the mount point. Once you mount |
51 |
something on it, it takes on the permissions of the mounted device. |
52 |
|
53 |
# ls -ld t |
54 |
drwxr-xr-x 2 root root 6 Apr 21 13:34 t |
55 |
|
56 |
# mount /dev/sdd1 t -o umask=0 |
57 |
|
58 |
# ls -ld t |
59 |
drwxrwxrwx 7 root root 16384 Jan 1 1970 t |
60 |
|
61 |
See, the 755 changes to the 777 specified in the mount |
62 |
options. /dev/sdd1 is a FAT16 formatted flash disk. |
63 |
|
64 |
|
65 |
-- Neil Bothwick "We demand rigidly defined areas of doubt and |
66 |
uncertainty!" |
67 |
-- |
68 |
gentoo-user@g.o mailing list |