You are not logged in.
Pages: 1
I can mount/unmount usb/cd/dvd drives with no problems and view the files there. What I cannot do is write to these devices as a non-root user.
When I look at the ownership of the mountpoints these are owner root and group root, instead of something useful like storage. Where are these defaults set? What file needs to be modified so that external media is mounted in a form that can be written to?
Offline
A cd/dvd will have an iso9960-filesystem - which is read-only!! You can _burn_ an iso-image to a cd/dvd, but once it has been burned, there is no way you can change anything!
As for the usb-drive, I presume it has a ntfs-filesystem on it, and you have to mount with ntfs-3g - something like this:
mkdir /mnt/usb; chmod a+rwx /mnt/usb
mount -t ntfs-3g -o uid=0,gid=0,umask=000,noatime,locale=en_US.utf8 /dev/sdX1 /mnt/usb
Now you can easily read and write as a 'normal' user ...
Last edited by perbh (2010-02-12 16:36:08)
Offline
I assume you use some program that automatically mounts removable media? (`autofs` maybe? I don't use them.)
In that case, it's probably related to the configuration of that program.
If you mount/umount manually:
It should be you who decides the owner/group of the mountpoint, while creating the directory, but i'm not even sure if that affects the read/write permissions to the device. Did you try using options for mount, like `mount -o rw /dev/sr0 /mnt/cd0`?
(`man mount` for lots more info)
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline
No, the setting is somewhere in hal, dbus, or udev. I want to be able to mount in the window manager and am using pcmanfm. I'm just wondering where the defaults are set such that the mounted drive is owned by root. All the mountpoints in /media are owned by root.
I can modify the settings in hal so that a regular user can mount/unmount but where do I change the ownership and permissions?
Offline
I use pmount, but I assume your fm might not.
So, looking in man mount I see:
uid=value and gid=value
Give all files in the filesystem the indicated user or group id, pos‐
sibly overriding the information found in the Rock Ridge extensions.
(Default: uid=0,gid=0.)
mode=value
For non-Rock Ridge volumes, give all files the indicated mode.
(Default: read permission for everybody.) Since Linux 2.1.37 one no
longer needs to specify the mode in decimal. (Octal is indicated by a
leading 0.)
Change your fstab accordingly.
Edit: I noticed perbh already gave the answer. Points to him.
Last edited by fsckd (2010-02-13 06:03:54)
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
The usb devices have either ext2,ext3,ext4 or fat32 partititions. Setting a particular type in /etc/fstab seems to limit the options to one particular type and is not generic enough for the range of devices.
The devices mount/unmount with no problems. The problem is the ownership of the mounts. The defaults are set somewhere as root:root and 0600.
In /etc/udev/rules.d/90-hal.rules these decisions are passed to the hal daemon. I can't figure what hal does with them or where these defaults are set. What I would like to do is have them mounted as username:storage or username:something. Something other than root:root.
Offline
Oh, I see what you mean. I'm not sure I have an answer ...
If I may ask a question, are you trying to set for all hotpluggable devices?
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
same stuff,when I'm starting #thunar it mounts usb flash
but when i start $thunar it doesn't mount
maybe add something to /etc/group ???
Offline
Pages: 1