public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] how to access mounted dir with non-root?
@ 2005-08-12 15:33 danielhf
  2005-08-12 16:07 ` Uwe Thiem
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: danielhf @ 2005-08-12 15:33 UTC (permalink / raw
  To: gentoo-user

i've found that i could not access the mounted 
directory with non-root users. 
1. i "chown" directories under "/mnt" to the user,
   but so long as i mount, the permission of the 
   specific dir will be changed to "drwx------" and
   owner changed to root automatically.
2. i try to use a mount option "users",
   $> mount /dev/hda6 /mnt/win -o rw,users
   no luck somehow as well.
3. i would not use "sudo" to do this, i believe there is 
   a way to solve the problem. and not sure "sudo" will work.

any ideas about this? thanks a lot in advance

best regards
daniel

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [gentoo-user] how to access mounted dir with non-root?
@ 2005-08-13 22:59 Michael Swanson
  2005-08-13 20:54 ` Neil Bothwick
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Swanson @ 2005-08-13 22:59 UTC (permalink / raw
  To: gentoo-user

Is this technique of umask=0 safe to use on an NTFS volume?  I want to 
mount an NTFS drive on my desktop so that a regular user can access it. 
    Is there a similar way to mount it with only read permissions, 
seeing as writing to NTFS drives isn't usually a particularly good idea 
with Linux.

Thanks,
Mike Swanson
rearden@atlantisvalley.com

On Fri, 12 Aug 2005 21:45:44 +0200, Holly Bostick wrote:


 >>> > Don't you mean umask=0? umask inverts the bits, so 777 gives
 >>> > --------- to all files.
 >>> >
 >>> >
 >
 >>
 >> I'm currently in the middle of an 'argument' with someone else about
 >> this, so explain, please.
 >>
 >> If umask masks bits off of the 'default' permissions, then what is the
 >> point of umask=000?


To give rwxrwxrwx, which is fine for a FAT filesystem, and certainly
better than ---------


 >> It seems that it would leave the permissions as the
 >> default, which appear to be 755 (is there a creation mask of 022
 >> somewhere in the 'default' settings?


And there's the rub. Setting permissions to 755 only gives write access
to the owner, which is root when mounting at bootup. The other way of
dealing with this with FAT filesystems is to use the uid/gid options to
set yourself as the user, but that only works on a single user system.


 >> The other person says that umask=000 removes all restrictions and gives
 >>  all permissions to everybody, but I just don't understand how this
 >> could be, unless the specific file/mount point was already set that way
 >> (no file creation mask, so the files are 'created' with the default
 >> 777/666, or inherited the permission structure of the parent).


The mount point is irrelevant, what counts is the permissions on the
mounted filesystem, not the parent of the mount point. Once you mount
something on it, it takes on the permissions of the mounted device.

# ls -ld t
drwxr-xr-x  2 root root 6 Apr 21 13:34 t

# mount /dev/sdd1 t -o umask=0

# ls -ld t
drwxrwxrwx  7 root root 16384 Jan  1  1970 t

See, the 755 changes to the 777 specified in the mount
options. /dev/sdd1 is a FAT16 formatted flash disk.


-- Neil Bothwick "We demand rigidly defined areas of doubt and 
uncertainty!"
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-08-15  6:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-12 15:33 [gentoo-user] how to access mounted dir with non-root? danielhf
2005-08-12 16:07 ` Uwe Thiem
2005-08-12 19:18   ` Neil Bothwick
2005-08-12 19:45     ` Holly Bostick
2005-08-12 19:54       ` Ciaran McCreesh
2005-08-12 20:36       ` Neil Bothwick
2005-08-12 17:47 ` Stefan Kögl
2005-08-13 14:22   ` danielhf
2005-08-15  6:15 ` Dirk Heinrichs
  -- strict thread matches above, loose matches on Subject: below --
2005-08-13 22:59 Michael Swanson
2005-08-13 20:54 ` Neil Bothwick
2005-08-14  3:10   ` danielhf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox