[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Permissions for an entire PARTITION



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Oct 25, 2016 at 11:33:23AM -0500, Richard Owlett wrote:
> On 10/25/2016 10:40 AM, Greg Wooledge wrote:
> >On Tue, Oct 25, 2016 at 10:32:29AM -0500, Richard Owlett wrote:
> >>I'm in a multi-boot environment, multiple installs of Debian.
> >>I want all install to have read/write/execute permissions.
> >>The partition will effectively be serving as a common scratch pad
> >>in order to exchange information. There is organically a single
> >>user, [*ME*] and there is *NO* networking of any sort whatsoever.
> >
> >The simplest way would be to synchronize your UID across all your
> >installed operating systems.  If your UID is, let's say, 1000 on every
> >system, and the files on the partition are owned by user 1000, then
> >user 1000 (you) will have ownership of the files whenever you mount
> >the partition.
> 
> That sounds like what I want.
> I had previously created a ext2 partition on /dev/sda10 and a label
> of jessie-dvds .
> How do I inform the "WORLD" that it belongs to UID 1000?
> Right now when I attempt to mount it, I am asked for root password.
> Not acceptable.

I think Greg nailed it: there are two issues at work.

- - First, to be able to *mount* the thing, you gotta be root. Unless
  root (i.e. the admin) has set things up to allow (some, all) users
  to mount the thing. What thing and where is pretty tightly controlled
  (you set up a device and mount point in fstab and add the option
  "user", as Greg pointed out; you can even specify some users &
  groups if you want finer control -- e.g. a group "backup" should
  be able to mount backup media). See the man page for "mount" for
  the gory details.

- - Second, once mounted (and *if* the file system has provisions
  for that: all the DOS heirs like vfat &c don't), the files [1]
  "remember" whom (user and group) they belong to and what permissions
  they have (and perhaps a couple of other things, if you have
  extended attributes) If you are multi-booting, it's possible that
  you are a different user [2] on each operating system, and suddenly
  find out you home belongs to someone else.

> tomas' reply confused me ;/

Sorry to hear that. Seems I've been too terse (again :). My
reply concerned "Second" above: There are
file systems which are constantly coping with this user ID problem
(NFS, as a network file system comes to mind). Those have a facility
to "map" user IDs at boot time (i.e. stating that "user 1000 at
machine A is actually the same as user 1003 at machine B".

Most file systems intended to be mounted locally don't have that:
therefore synchronizing the user IDs on alternatively booted OSes
(or on OSes sharing a removable medium) makes sense.

Failing that, you can make "everything accessible by everyone"
(the DOS solution: by accident you get that when the file system
in question is vfat) or there is bindfs, which is... interesting
but may bring along some complexities of its own.

regards

[1] technically it's at the inode level where such things are stored.
[2] you may be called the same on those two OSes, but it's the user
   ID what matters, since that is what is stored on the file's inode.

- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgQZMUACgkQBcgs9XrR2kZsCwCfQpdLJpa8nrnvanIZGWTNmkla
e/YAoIERwAtPZcXpYmoukNNeU9xblQIZ
=J/Eq
-----END PGP SIGNATURE-----


Reply to: