[opensuse] drives and mount points as root:root ?
I've bumped into a problem with a new install of 11.0... not sure what the right way is to resolve it is... The computer has this partition setup: swap / /boot /home /media/partition1 /media/partition2 /media/partition3 All were created/formatted at install. After install, $USER cannot write to /media/partiton1, 2, or 3 since they are root:root (owner:group). I can manually tweak these partitions to $USER:root and then $USER can write to the partitions... but this is a dirty way to resolve the problem... what is the "right" way? Why wasn't this configured right from the clean install? What causes this? This problem has also shown up with HAL mounted USB drives... the USB drive is mounted at root:root, and $USER cannot write to the drive. In both cases, root has full read/write access to the drives/partitions. C. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2008-11-21 at 22:51 +0100, Clayton wrote:
I've bumped into a problem with a new install of 11.0... not sure what the right way is to resolve it is...
The computer has this partition setup: swap / /boot /home /media/partition1 /media/partition2 /media/partition3
All were created/formatted at install. After install, $USER cannot write to /media/partiton1, 2, or 3 since they are root:root (owner:group). I can manually tweak these partitions to $USER:root and then $USER can write to the partitions... but this is a dirty way to resolve the problem... what is the "right" way? Why wasn't this configured right from the clean install? What causes this?
This problem has also shown up with HAL mounted USB drives... the USB drive is mounted at root:root, and $USER cannot write to the drive.
In both cases, root has full read/write access to the drives/partitions.
Ok... I'll try to explain; it is really simple, but the explanation is not. The /media/whatever filesystems belong to the user that mounted them, if they are VFAT things. Meaning, that if you are logged in as user, and then you plug in USB drives, they will belong to you, and if you log in as root and plug them in, they will belong to root. Caveat: if you log off and log in as another user, without removing the USB drives, they will remain the property of the previous user. There is bugzilla about this. Now, that was for VFAT filesystems. What for ext3, reiser, xfs, ie, for native Linux filesystems? Well, they have their own permissions regardless of who mounts them... so you have to change their permissions manually one by one, as root. It is your duty as root of the system :-p And, as for the /media/partition filesystems... I guess they are automatically mounted by root when he logs in. The proper solution, or rather, the one I consider proper, is that you create adequate entries in the fstab files for them wherever you consider appropriate. What I said above about the permissions depending on the type still applies. I hope I didn't confuse you more :-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkknOxwACgkQtTMYHG2NR9VXfwCfWm6KXJ1KpJfMGR8b34Ol5egC a0AAn0DWhOxvrIVHIxE0W6Coe8/lwwsE =NjXS -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
The /media/whatever filesystems belong to the user that mounted them, if they are VFAT things. Meaning, that if you are logged in as user, and then you plug in USB drives, they will belong to you, and if you log in as root and plug them in, they will belong to root.
OK, fair enough, but... but... that is not what is happening.. or is it? We are logged in as USER and we have a new unpartitioned USB drive. That drive was plugged in and we used YAST to partition/format it (with Reiser). Then YAST was exited and the drive (still not mounted) was disconnected. Still logged in as USER, we plug in the newly formatted drive and it is mounted by HAL as root:root.... not user:root or any other combination that allows user to access. A manual dirty hack/workaround which I used in this case is to chown the dynamic mount point (/media/disk) to user. This persists at least over multiple unplug/plugin... I don't know if it'll persist over a reboot.
Now, that was for VFAT filesystems. What for ext3, reiser, xfs, ie, for native Linux filesystems? Well, they have their own permissions regardless of who mounts them... so you have to change their permissions manually one by one, as root. It is your duty as root of the system :-p
OK, I can do that... but that really screws over a new user - which is the case here.. new openSUSE 11 user.. just migrated from Windows.. and seriously annoyed that the Reiser partitions he created on _install_ (not created after install) are not accessible as USER. Thsi _should_ be set up on install so that all $USER are members of a group that is used for all local mount points created on install... but this doesn't seem to be the case.
And, as for the /media/partition filesystems... I guess they are automatically mounted by root when he logs in. The proper solution, or rather, the one I consider proper, is that you create adequate entries in the fstab files for them wherever you consider appropriate. What I said above about the permissions depending on the type still applies.
Again, I don't mind fiddling in fstab, but a new user shouldn't have to. I honestly cannot remember what i do on my system since I modify the default install so much.... on this new user install though, he is left with essentially a half usable system until "Steve the Uber Linux Geek" comes by and fixes it for him. C. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday, 2008-11-22 at 06:04 +0100, Clayton wrote:
The /media/whatever filesystems belong to the user that mounted them, if they are VFAT things. Meaning, that if you are logged in as user, and then you plug in USB drives, they will belong to you, and if you log in as root and plug them in, they will belong to root.
OK, fair enough, but... but... that is not what is happening.. or is it?
We are logged in as USER and we have a new unpartitioned USB drive. That drive was plugged in and we used YAST to partition/format it (with Reiser). Then YAST was exited and the drive (still not mounted) was disconnected. Still logged in as USER, we plug in the newly formatted drive and it is mounted by HAL as root:root.... not user:root or any other combination that allows user to access.
Yep, but the key word in my paragraph above is VFAT. Your partition was not made VFAT... and thus you have to manually give it the owner and permissions you want. There is no way around that. It is a Linux native filesystems, permissions are included in it, they are not given automatically on the fly as for VFAT (which has no ownership permissions of its own). You can do it with konqueror if you like... as root, though.
A manual dirty hack/workaround which I used in this case is to chown the dynamic mount point (/media/disk) to user. This persists at least over multiple unplug/plugin... I don't know if it'll persist over a reboot.
Probably. It is not a dirty workaround, it is the way things are. A trick with such media is to create a subdirectory that belongs to the user: then, although the media will still belong to root, the directory with everything inside will belong to the user on any system you plug it in.
Now, that was for VFAT filesystems. What for ext3, reiser, xfs, ie, for native Linux filesystems? Well, they have their own permissions regardless of who mounts them... so you have to change their permissions manually one by one, as root. It is your duty as root of the system :-p
OK, I can do that... but that really screws over a new user - which is the case here.. new openSUSE 11 user.. just migrated from Windows.. and seriously annoyed that the Reiser partitions he created on _install_ (not created after install) are not accessible as USER. Thsi _should_ be set up on install so that all $USER are members of a group that is used for all local mount points created on install... but this doesn't seem to be the case.
Nope! This is one of the important differences of Linux (or rather, UNIX) filesystems: they belong to the administrator, unless he gives them away. It maybe a nuisance for external removable media, but the system was invented for big, static machines, servers, where such a thing as removable media was a rarity. It simply is one more task you have to do when preparing a disk.
And, as for the /media/partition filesystems... I guess they are automatically mounted by root when he logs in. The proper solution, or rather, the one I consider proper, is that you create adequate entries in the fstab files for them wherever you consider appropriate. What I said above about the permissions depending on the type still applies.
Again, I don't mind fiddling in fstab, but a new user shouldn't have to. I honestly cannot remember what i do on my system since I modify the default install so much.... on this new user install though, he is left with essentially a half usable system until "Steve the Uber Linux Geek" comes by and fixes it for him.
Well, he will have to learn new tricks :-) The same way we learnt tricks for use in windows, we have to learn different tricks for use in Linux. There are somethings that are different and that don't feel "easy" at the beginning :-) I will tell you of another difference you haven't noticed yet: That the files you have created as user on that reiserfs external media of yours (I do the same, by the way) will not be readable by another user (obviously), even if he reconnects the USB, but also may not be available to you on another Linux system with the same, correct, user. Why? Because what the filesystems stores with each file is the ID number of the owner of that file, not the name. Unless you create all your machines (and friend's machines) with the same numbers, this is another nuisance. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkknzYoACgkQtTMYHG2NR9XQJgCeO6N/sBOiyo6+0DzqVJusEhfR MP8AnRlK3ndD3EwUojEMYhH1rLzfkfi7 =rzid -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Again, I don't mind fiddling in fstab, but a new user shouldn't have to. I honestly cannot remember what i do on my system since I modify the default install so much.... on this new user install though, he is left with essentially a half usable system until "Steve the Uber Linux Geek" comes by and fixes it for him.
Well, he will have to learn new tricks :-)
He is :-) Actually he's very willing to learn the new tricks and is doing great... reading man pages, trying things.. calling me when he breaks things. So far on his second machine he's re-installed Linux about a dozen times in the past 2 weeks... mostly to learn how it works, but also to fix things he broke so badly he didn't know how to back out of it all. He's enjoying the transition... something new to learn.
I will tell you of another difference you haven't noticed yet: That the files you have created as user on that reiserfs external media of yours (I do the same, by the way) will not be readable by another user (obviously), even if he reconnects the USB, but also may not be available to you on another Linux system with the same, correct, user.
Why?
Because what the filesystems stores with each file is the ID number of the owner of that file, not the name. Unless you create all your machines (and friend's machines) with the same numbers, this is another nuisance.
You know, I've never noticed that at all. I use Reiser (old habit) on all my disks including all my USB disks. I've shared those USB disks around with other people on other Linux distros.. eg Ubuntu which use (I assume) a different UID:GID for the users (I seem to recollect Ubuntu uses 100 for user and openSUSE 1000 or something like that.. I could be misremembering) and no one has complained about permissions. Hmmm maybe I'm placing them there with a different umask or something making the world read/write. Have to check. I forget all the twiddling I do when I install my own system... the stuff is second nature and I don't think about it anymore. It only comes back to bit e me when I help a new user set up a Linux install. :-P C. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, 2008-11-23 at 10:11 +0100, Clayton wrote:
Well, he will have to learn new tricks :-)
He is :-) Actually he's very willing to learn the new tricks and is doing great... reading man pages, trying things.. calling me when he breaks things. So far on his second machine he's re-installed Linux about a dozen times in the past 2 weeks... mostly to learn how it works, but also to fix things he broke so badly he didn't know how to back out of it all. He's enjoying the transition... something new to learn.
That's the good spirit! :-)
Why?
Because what the filesystems stores with each file is the ID number of the owner of that file, not the name. Unless you create all your machines (and friend's machines) with the same numbers, this is another nuisance.
You know, I've never noticed that at all. I use Reiser (old habit) on all my disks including all my USB disks. I've shared those USB disks around with other people on other Linux distros.. eg Ubuntu which use (I assume) a different UID:GID for the users (I seem to recollect Ubuntu uses 100 for user and openSUSE 1000 or something like that.. I could be misremembering) and no one has complained about permissions. Hmmm maybe I'm placing them there with a different umask or something making the world read/write. Have to check.
Or you are using them as root.
I forget all the twiddling I do when I install my own system... the stuff is second nature and I don't think about it anymore. It only comes back to bit e me when I help a new user set up a Linux install. :-P
I know. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkkpPxoACgkQtTMYHG2NR9VhIQCdGQVmlTP2L7mRJ1AkZw5xMutN lRQAn1cgtpqzTUI58yNwHnZl9Bdmb71D =l68e -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Clayton said the following on 11/23/2008 04:11 AM:
Well, he will have to learn new tricks :-)
He is :-) Actually he's very willing to learn the new tricks and is doing great... reading man pages, trying things.. calling me when he breaks things. So far on his second machine he's re-installed Linux about a dozen times in the past 2 weeks... mostly to learn how it works, but also to fix things he broke so badly he didn't know how to back out of it all. He's enjoying the transition... something new to learn.
That's good. Many people seem to approach Linus with antagonism and an unwillingness to learn or ask questions or 'try again' when things don't go right the first time. Breaking things is a great way to learn :-) Some people are unwilling, too 'risk averse', and considering the downside to the upside, this is a poor strategy. Give you friend my good wishes! -- "Never ascribe to malice that which can be explained by incompetence." -- Napoleon -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Anton Aylward
-
Carlos E. R.
-
Clayton