Unable to write to new partitions

Colin Watson cjwatson at ubuntu.com
Wed Mar 21 23:43:01 UTC 2018


On Wed, Mar 21, 2018 at 08:28:06PM +0800, Bret Busby wrote:
> One aspect to the use of the chown and the chmod -r 700 commands, on
> the Data05 and Data06 partitions, is that the primary reason for the
> existence of the Dataxx partitions, is that they can be accessed by
> different operating systems, upon mounting the Dataxx partitions.
> 
> This then gives rise to the question; if a partition would be owned by
> a user within one operating system, with the permissions sent to that
> user (700) within that operating system, what then happens regarding
> access and permissions, tn terms of a user from another operating
> system?

When considering this sort of thing, the important thing to know is that
file ownership in reality works using numeric IDs: if a file (or
directory or whatever) is owned by e.g. a user with user ID 1000, then
whatever OS has that file system mounted will see it as being owned by
whatever user has ID 1000 in its view of the world; no chowning etc.
will be required for that user to do the same operations as the user
with ID 1000 on any other OS.

I think your most practical options are likely to be one of these:

 1) Make sure the relevant user has identical user IDs on all the
    systems in question (this is often in fact practical, and is by far
    the simplest answer; I've done it myself, although I gave up the
    multi-booting habit many years ago).

 2) If these partitions are basically just data as the names imply and
    don't for example contain bits of the OS, then consider using a
    filesystem like NTFS rather than ext[234].  With the ntfs-3g driver,
    you have various options for access control, which include the
    option to assign full read/write/etc. permissions to a user of your
    choice in /etc/fstab.  This is likely to be easier to handle in this
    kind of complex multi-boot scenario.  (However, I'm not familiar
    with what level of support the various BSDs have for NTFS.)

There is a third option involving creating "shadow" users to represent
the user ID in other installed OSes and then creating a group containing
all of them, but doing this right involves a fair bit of care and
knowledge, so if you don't immediately see what I mean from that
description then you should probably go for one of the two options above
instead.

-- 
Colin Watson                                       [cjwatson at ubuntu.com]




More information about the ubuntu-users mailing list