From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] how to access mounted dir with non-root?
Date: Fri, 12 Aug 2005 21:36:35 +0100 [thread overview]
Message-ID: <20050812213635.59c71d63@hactar.digimed.co.uk> (raw)
In-Reply-To: <42FCFC68.9050703@planet.nl>
[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]
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!"
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-08-12 20:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050812213635.59c71d63@hactar.digimed.co.uk \
--to=neil@digimed.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox