Unable to write to new partitions

Bret Busby bret.busby at gmail.com
Sun Mar 18 19:59:34 UTC 2018


On 18/03/2018, Colin Watson <cjwatson at ubuntu.com> wrote:
> On Sat, Mar 17, 2018 at 11:50:32PM +0800, Bret Busby wrote:
>> On 17/03/2018, Colin Watson <cjwatson at ubuntu.com> wrote:
>> > This is dangerous and you should undo it as soon as possible ("sudo
>> > chmod 660 /dev/sda18 /dev/sda19").  Otherwise-unprivileged processes on
>> > your system don't need the ability to write to the *device nodes*.
>>
>> Done. Did not solve problem.
>
> I didn't expect it to solve the problem; it was just a mistake that
> needed to be undone.
>
>> Used chmod 666
>
> There's been an awful lot of verbiage on this thread, and while it was
> accurate for technical users it didn't clearly and concisely point out
> the mistake here, so I'll summarise.
>
> chmod 666 equates to the symbolic mode "rw-rw-rw-", i.e. read and write
> permissions for everyone.  However, a directory must also be executable
> in order to be able to open files inside it.  Therefore this should have
> been chmod 777 ("rwxrwxrwx").
>
> It's entirely irrelevant which of your multiple installed operating
> systems you do this from.  The actual storage of owners and groups of
> files and directories uses numeric IDs, and root is always 0, so root on
> each of your OSes is equivalent for this purpose.
>

I will not argue the point - I will merely say that when I changed the
permissions from within the UbuntuMATE 16.04 installation, it did not
allow me to write to the two partitions, and, when I did it from the
operating systems that created each of the two partitions, it worked
and I was able to write to the two partitions, from withiong
UbuntuMATE 16.04.

Whether my perception of the reason that my actions were successful,
in the way that I was able to achieve success, is correct, does not
alter the fact that what I did worked and that attempts otherwise, did
not work. If I am wrong in my understanding, then, so be it, but, what
I did, worked, and, what I did otherwise, did not work.

And, I note that, when the two partitions had been created outside of
UbuntuMATE 16.04 (in other words, by other operating systems), I was
limited in what I could do with the partitions, as the superuser in
UbuntuMAQTE 16.04.

So, from my observations, with the restrictions and prohibitions that
applied to the superuser in UbuntuiMATE 16.04, it seemed logical that
the two partitions are owned by the superuser of the operating systems
from whence the two partitions were created.

My reasoning is based on my observations, of being prohibited from
performing actions on the two partitions, in the role of the superuser
of UbuntuMATE 16.04, until I had rand the chmod 777 comand on the two
partitions, from the superusers that created each of the two
partitions.

As I said above, my perception may be wrong, but, whether it is
correct or not, the path that I followed, based on that perception,
was the only path that got me to the destination.

> Note that world-writable files and directories are common security
> vulnerabilities, and you should consider instead restricting the ability
> to write to these file systems to just those users that actually need
> it.
>

I am wondering, in this, whether, operhaps, it is not the chmod
command,  that needed to be used, but, perhaps, thechown command.

Given that, as cited in the post by Ralph;

"
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,
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?




-- 

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