Unable to write to new partitions

Bret Busby bret.busby at gmail.com
Wed Mar 21 12:28:06 UTC 2018


On 19/03/2018, Colin Watson <cjwatson at ubuntu.com> wrote:
> On Mon, Mar 19, 2018 at 03:59:34AM +0800, Bret Busby wrote:

<snip>

>>
>> I am wondering, in this, whether, operhaps, it is not the chmod
>> command,  that needed to be used, but, perhaps, thechown command.
>
> Indeed, perhaps that's the case, but it depends on exactly what you're
> trying to achieve.
>
>> "
>> On Sat, 17 Mar 2018 23:50:32 +0800, Bret Busby wrote:
>> >bret at bret-Aspire-V3-772-UbuntuMATE:~$ ls -ld /media/bret/Data05
>> >/media/bret/Data06
>> >drw-rw-rw- 3 root root 4096 Mar 17 18:26 /media/bret/Data05
>> >drw-rw-rw- 3 root root 4096 Mar 17 19:35 /media/bret/Data06
>> "
>>
>> I am wondering whether the problem may have been in the
>> "root root"
>> of those two lines; Does that text indicate, for one or both of those
>> instantiations of "root", that root is the owner of the partition,
>
> Yes.  (The first "root" is the user and the second is the group.)
>
>> and, thence, as, as a user without superuser privilege (other than
>> invoking the sudo command), the permissions would have been needed to
>> be set at xx7, for me, as a user, to bw able to create directories,
>> and, write to file both at the top level, and, within the directories,
>> of tyhe two partitions?
>
> Yes.  If for example you were to run:
>
>   sudo chown -R bret:bret /media/bret/Data05 /media/bret/Data06
>   chmod -R 700 /media/bret/Data05 /media/bret/Data06
>
> ... then that would assign ownership of those directories and everything
> under them to the user "bret", and processes running as the user "bret"
> or as root will be able to do what they will within those directories;
> processes running as other users will not be able to see anything under
> /media/bret/Data05 or /media/bret/Data06.  If that's what you want to
> achieve, then that's what you should do.
>
> If you want to achieve something else, then please explain your exact
> goals.
>

That certainly worked, on the system other than the one with the
Data05 and Data06, to which I had previously been unable to write.

On this system, I have a partition which had previously been the
Debian 5 operating system installation partition, that I had shrunk to
10GB, and reformatted to ext4, but, to which I could not write.

Having run the two commands above - chown then chmod -R 700, on the
partition, I moved (not using the move command - I lost decades of
data, using the mv command, some years ago) a few GB from my home
partition, and so, now, the free space on my home partition, on this
computer, is now about 6GB; 10%.

So, I believe that the problem lay in the ownership of the partition.

This home partition is the one that was attacked by the firefox #.wal
file, that filled its free space, each time I enabled javascript, to
which problem (the problem of firefox playing pacman on my free
space), my wife has suggested a solution that I will try (providing I
remember), the next time I need to run firefox with javascript enabled
(until then, firefox can stay in its closed box).

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?

For example, on the system with the Data05 and Data06 partitions,
provision exists for, when it becomes available, UbuntuMATE 18.04 to
be installed to replace the Debian 7 installation, thus giving me
UbuntuMATE 14.04, 16.04, and,. 18.04, on the same system. Now, if the
user is set as me , and, the permissions set at 700, on those two
partitions, as specified in the two commands as stated above, for me
within this UbuntuMATE 16.04 installation, would I be able to then
access Data05 and Data06, from the other twop operating systems,
without having to first run the chown and chmod commands on them, from
within those operating systems, using the syntax above?

And, similarly, if another type of operating system, such as
DragonflyBSD, became able to deal with the hardware of the computer
system (including but not limited to the nVIDIA Optimus stuff, which
requires nouveau (?) ), and would be installed on the computer
(providing it has rw functionality on ext4), would that also be able
to access those two partitions, if the chown and chmod commands are
run according to the syntax above?


-- 
Bret Busby
Armadale
West Australia
..............

"So once you do know what the question actually is,
 you'll know what the answer means."
- Deep Thought,
 Chapter 28 of Book 1 of
 "The Hitchhiker's Guide to the Galaxy:
 A Trilogy In Four Parts",
 written by Douglas Adams,
 published by Pan Books, 1992

....................................................




More information about the ubuntu-users mailing list