I’m mounting these using KDE ( but the same happened from within Gnome ) and the uid/gid for the ext4 partitions are set to root, making them unusable for me. The vfat one is mounted for my user though:
drwxr-xr-x 4 root root 4096 Jun 14 09:46 6c4601aa-71a4-4bea-b698-5f30dab503ab
drwxr-xr-x 5 root root 1024 Jun 10 16:34 9a51571f-519d-4a18-8b74-5f490f8f25c5
drwx------ 9 rmuntean users 6384 Jan 1 1970 CF64-626F
How can I mount the ext4 partitions and have write access to them?
As you do not post the complete “prompt-command-output-prompt” sequence we can not see what exactly and from where you show. (and please use CODE tags around copiued/pasted computer text, it is the # button in the tool bar).
Is there something on those file systems? And when yes, who created (and thus owns) those directories/files?
Here’s the complete output, I was simplifying it a bit.
DOMAIN\rmuntean@rmuntean-w7:/var/run/media/DOMAIN\rmuntean> ll
total 21
drwxr-xr-x 4 root root 4096 Jun 14 09:46 6c4601aa-71a4-4bea-b698-5f30dab503ab
drwxr-xr-x 5 root root 1024 Jun 10 16:34 9a51571f-519d-4a18-8b74-5f490f8f25c5
drwx------ 9 DOMAIN\rmuntean DOMAIN\domain users 16384 Jan 1 1970 CF64-626F
Well, it behaves just like any other ext4 partition. There’s a lost+found directory, and if I use sudo to create directories and assign them back to me it’s fine. But what I want is to be able to create top-level directories without needing to use sudo.
DOMAIN\rmuntean@rmuntean-w7:/var/run/media/DOMAIN\rmuntean/6c4601aa-71a4-4bea-b698-5f30dab503ab> ll
total 920804
drwxr-xr-x 2 1000 root 4096 Jun 14 09:21 asd
drwxr-xr-x 2 DOMAIN\rmuntean DOMAIN\domain users 4096 Aug 6 12:18 blah
-rw-r--r-- 1 root root 942871383 Jun 14 09:49 hoi3.tar.cz
drwx------ 2 root root 16384 Jun 14 09:18 lost+found
On 08/06/2013 11:26 AM, robert munteanu wrote:
>
> DOMAIN\rmuntean@rmuntean-w7:/var/run/media/DOMAIN\rmuntean> ll
> total 21
ok, i suspect Henk is as confused as i am because so far what have
showed us make no sense…so, lets begin again:
-what operating system and version are you using
-have you recently run in all of the updates (via YaST Online Update,
zypper or what?)
-if using a desktop environment, please tell us its name and version
-and, if you boot the machine without the USB plugged in…and, then
after the system is completely up and running and then you plug in
the USB, do you find that the system automatically signals you (with
a pop-up) that something has been plugged in and ask what you wanna
do with it (like maybe open in a file manager, or something like that)
-or if that automatic feature does not work, how are you mounting it
(show us the exact command line sequence you use to mount it)
-then (once the USB drive is mounted either automatically or
manually, please show us the terminal output and input, as well as
the beginning prompt and exit prompt, from
df -hlT
cat /etc/mtab
mount
sudo /sbin/fdisk -l
sudo /sbin/blkid
uname -a
lsb_release -sircd
then please copy/paste the input/output back to this thread using the
instructions here: http://goo.gl/i3wnr
i’m not thinking i can be much more ‘help’ (having never run a system
with encrypted partitions, and have never encountered a path with
both / and \ in it, but lets try this and see what we learn:
ls -hal /run/media/DOMAIN\rmuntean
ls -hal /var/run/media/DOMAIN\rmuntean
results again between code tags, please…
oh, and Henk asked you and i would also like to know:
-“who created those directories/files?”
and, also i wanna know were they created by your 12.3 system, or some
other
finally, are you being asked for the password/phrase to unlock the
crypto protected portions of the USB drive?
Why don’t you just change the ext4 partitions owner using chown -R? You say you can sudo, so (hopefully) you can change the ownership of the filesystem.
The vfat partition is mounted as owned by the user who mouted it because vfat is too dumb to store ownership informations.
robert munteanu wrote:
> The only catch is that it’s now locked to my local uid, and when I move
> it to another computer I’ll have the same problem.
Well, that’s fundamental. Files in Linux filesystems are owned by
whoever created them (meaning by a particular UID). You UID needs to be
the same on all the systems you use if you want to keep ownerships as
you move around.
I was away for a while. The fact that there are no w-bits for group and specialy for others is blocking every non-root user to create anything on the mount point (the root of the device).
That is the same as e.g. /, /usr, /bin, /home, etc. and as such not abnormal. This is of course different from a spontanious mounted non-Linux file system (like NTFS ands VFAT) because they have no owners nor permission bits and the thus they are faked by assuming that the desktop users is the owner and that hey may read/write/execute there.
For a Linux file system that is not a good approach. Afetr all it would be bad when Unix/Linux permissions were so easy to circumvent. This IMHO the designers (of this spontanious mounting on request of a desktop session) have chosen to make root the owner. All directories inside there can then be owned by others and used by the. (when there is a directory owned byy you on the device, you can create there). This is exectly the same as /home:
/home is owned by root and has rwxr-xr-x and my home directory is owned by me and has also rwsr-xr-x, but as I am the owner I can do at will there.
Can this be done differntly. Of course. I can create a directory (e.g. in my /home/… somewhere) and then an Linux file system can be monted there. And then I will be able to create, etc. there same as in all other places I own. The problem here iss that the OP wants this to happen with his mounts, but the spontanious mount does not support it.
Is this a bug or a feature? I realy do not know. I can understand that the solution chosen was arbitrary the best one. Do not forget that these spontanious mounting threw up a lot of very principal problems because Unix/Linux is not realy designed for it. The fact that we are now at solution number x (someone remember HAL? and whatwas before it and waht came after it?) shows that it has some not obvious problems.
Mounting “manualy” (with or without help from an entry in /etc/fstab, is always posisble of course becaus you can then mount whre you want and thus also on a directory that is owned by the user who is apparently the owner. But again, take care, other users then can not go there!
So far for the technical bachground as I understand it.
>> and, also i wanna know were they created by your 12.3 system, or some
>> other
>
> The directories under /var/run and /run are automatically
> created/destroyed when I mount/unmount the USB stick.
you misunderstood:
someone put some folders (three of them) on that USB stick…then
when you stick the USB device into the machine then the system
automatically creates mount points for the already created
directories (existing on the UBS) to /var/run and /run…right?
how else would the system know there are three directories there
unless they already existed on the USB device??
so, who created the three directories on the USB device? was that
you? and was it done by using the 12.3 system you are now using…or
were they created by root of this same 12.3 system, or some other system?
so, i think i know how to help you, but i still want that
question answered, please…
oh, and two more: i have never seen a path like either of these
/run/media/DOMAIN\rmuntean/
/run/media/DOMAIN\rmuntean/
how does that happen?
and, gosh i don’t see a /home mounted anywhere…
2. how does that work? (please excuse me for being profoundly confused)
This is not true. As the OP clearly tells in the first post here, there are three partitions on that device. Each holding a file system (different types). Every file system is mounted on it’s own mount point. Independent from the others. It is the same as if three different devices with each only one partition/file system on them are connected.
Doing a chown and or chmod on the mount point is of little use. While it works for the moment, it will not wotk on next connection of the device. Simply because the mount points are created anew for every spontanious (on request from the desktop) mount. You have then to repeat the chown/chmod every time again.
And yes, it is in the principles of Unix/Linux that ownership is by userid (not username btw). And when you move parts of the directory tree to another system, it depends if the same uid is configured there and, whoever (s)he may be. Becaue that user then the owner of the files on the other system. That may not be what you want. On systems that work together a common user/group administration is required. This is not only fort removable mass-storage, but it is the same for NFS mounting. (And thus they invented NIS to go with NFS).
> The only catch is that it’s now locked to my local uid, and when I move
> it to another computer I’ll have the same problem.
It is working exactly as designed and intended, there is nothing wrong.
NO, you can not create files and directories as user on the root of the
device, unless you chown the root directory of the filesystem (the mount
point after mounting); but this will not hold on an external media for
two reasons: the mounting is dynamic, and other computers have no
knowledge of it. Furthermore, it is not user “rmuntean” who is allowed,
but the user that has a certain UID number.
The only solution is that you create a directory belonging to that user,
and use that directory instead of the root of the device.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))
The three directories correspond to the three partitions on my USB stick. These are created automatically when the stick is plugged in. Not sure what program does these nowadays, maybe udisks.
/run/media is the path where they should be mounted. Not sure by whose rules, but anyway … And my username is DOMAIN\rmuntean since I have active directory integration.
That I don’t know sorry. Someone takes the USB disk,scans it, decides where to mount it and allow me to do that.