ext3 partitions on external usb drives can only be written to by root

Bug #222626 reported by Timmie
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

I have a external USB harddisk with the following partitions:
1) ext3 (ca. 50 GB)
2) vfat (20 GB)

When I plug this drive in I can only write to the vfat partintion as a normal user.
The ext3 partition can only be mounted read-only.

There's also been a question on Answers:
https://answers.launchpad.net/ubuntu/+question/2436

But the solution found there is merely a workaround.

Note that I have another 160GB ext3 drive which mounts without problems and gives write access.

Revision history for this message
Luke Faraone (lfaraone) wrote :

You have to "chmod" the disk so that it is world-writable, or simply chown the owner to your user. (as root)

This is not a bug, it is a feature.

Revision history for this message
Timmie (timmie) wrote :

This can't be a feature!

Why do I have to
1) get root
2) chmod my disk

to have the ability to access a linux file system on a external drive as a normal user?

Revision history for this message
Luke Faraone (lfaraone) wrote :

If you chmod it as publicly writable, you will not continue to have issues on that machine as well as others.

ext3, like NTFS, has Mandatory Access Control (see http://en.wikipedia.org/wiki/Mandatory_access_control ) built in, unlike FAT. In ubuntu, however, NTFS file permissions arn't respected. ext3 permissions are.

When you first make a ext3 partition, it is writable only as root. To change it, you chmod.

 If you "sudo useradd foo; mkdir /home/foo", that user cannot write to his home directory because the properties of the / partition are "by default, set to root only can write".

Revision history for this message
David Pottage (david-electric-spoon) wrote :

This looks to be the same problem as bug #121900

I would say it is a bug, and that it is incorect for the system to enforce the mandatory access control. The user has physical posseson of the USB drive, and even if he does not have root on the current ubuntu system, he could easily put it in another system that he does have root on, such as a live CD.

Therefore enforcing the access controls does not create any security, it just annoys and inconveniences the user.

Revision history for this message
Luke Faraone (lfaraone) wrote :

@David,

However, there are many scenarios in which respecting permissions is the proper thing to do. This is the way the system is designed to work, and any change would require discussion that is beyond the scope of bug reports. ubuntu-devel-discuss might be more appropriate.

Revision history for this message
markling (markling) wrote :

It's not a feature, it's a curse. It forces normal users to delve deep into the arcane secrets of linux. It is one of the things that prevents linux coming out of the dank cave where its maintainers keep it all to themselves and anyone prepared to endure the initiation. It's a like a masonic ritual, using linux. You have to wear sock braces, talk backwards, and have spent a considerable portion of your free time gaining an alchemists' warped appreciation of chemistry. Just so you can copy a file to a USB stick.

Revision history for this message
markling (markling) wrote :

I have read some things about permissions. More often than not, people say, 'Don't chmod 777! What are you, crazy!'. I think the idea is that if you were just going to chmod 777 everything, then there would be no reason for linux to have a superior file permission in the first place. But when it comes to USB, some people say, 'Just chmod 777 everything to everyone!". What are they, crazy? Even when I do chmod 777 everything on a USB, it doesn't always work. Sometimes it has worked. Sometimes it hasn't. I've no idea why not.

What I don't understand, if linux permissions have so much trouble with USB anyway, and the solution is just to chmod 777 everything anyway, then why not have linux always set USB drives up like that in the first place? It would save a lot of people a lot of pain. Those masters of the lodge or whoever would be able to change their USB permissions to something that doesn't work if they wanted to. And everyone else can simply get on with their work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.