You are not logged in.

#1 2011-03-08 00:41:48

Arsenal
Member
Registered: 2011-03-04
Posts: 9

Can't give user access to optical or flash drive

When I plug in my usb flash drive or put a cd in the optical drive as root my system correctly mounts and displays the information in Gnome.

When I do this as a user of the users group it says "Unable to mount 'USB'. Not Authorized" or "Unable to mount CAT4.0.0. Not Authorized".

$ groups chris
tty disk lp wheel network video audio optical floppy storage power users 

I looked at some other forum posts (https://bbs.archlinux.org/viewtopic.php?id=64868) and I think the issue is setting the permissions, but I'm having trouble relating the information here to my problem.

My fstab doesn't list any mounted devices and it doesn't appear that anything is in /media or in /mnt while I have both my disk and my usb stick in.

$ cat /etc/fstab
# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 defaults,noatime 0 1
/dev/sda4 /home ext4 defaults,noatime 0 1
$ ls -l /media
total 0

I don't have HAL right now, but I've tried it before (also adding my user to the HAL group and starting it up in daemons in /etc/rc.conf) without fixing anything.  And since root correctly mounts this stuff I think its only a permissions thing.

I tried running

$ sudo chmod 770 /dev/sdb

It ran, but I haven't noticed any changes. 

In order to get files I have to copy the files as root into /home/chris and then change the permissions with chmod, chown, and chgrp.

Offline

#2 2011-03-11 21:02:06

whatshisname
Member
Registered: 2010-04-24
Posts: 163

Re: Can't give user access to optical or flash drive

I looked at some other forum posts (https://bbs.archlinux.org/viewtopic.php?id=64868) and I think the issue is setting the permissions, but I'm having trouble relating the information here to my problem.

My fstab doesn't list any mounted devices and it doesn't appear that anything is in /media or in /mnt while I have both my disk and my usb stick in.

Your mounted devices show up in "/etc/mtab".

$ cat /etc/fstab
# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 defaults,noatime 0 1
/dev/sda4 /home ext4 defaults,noatime 0 1
$ ls -l /media
total 0

I don't have HAL right now, but I've tried it before (also adding my user to the HAL group and starting it up in daemons in /etc/rc.conf) without fixing anything.  And since root correctly mounts this stuff I think its only a permissions thing.

I tried running

$ sudo chmod 770 /dev/sdb

It ran, but I haven't noticed any changes.

If I'm not mistaken, /dev/sdb is created on the fly when you plug in the device.  Then goes away when you unplug it.

Try creating a folder for your usb drive in "/media".  Call it, for example, "/media/pendrive".  then "chmod 775 /media/pendrive".

Arch or the new kernels, rather, seem to want us to use "disk/by-uuid" labeling.  At least that's what I've started using.

From the command line, issue: ls -l /dev/disk/by-uuid/

Now plug in your pendrive and issue the above command again.  The new entry is the uuid number for your pendrive.

Now add the following line to /etc/fstab:

/dev/disk/by-uuid/98D4-D627 /media/pendrive vfat users,exec,noauto 0 0

Of course, substitute "98D4-D627" with whatever "ls -l /dev/disk/by-uuid/" tells you is the pendrive uuid.

Not sure if "mount -a" will work at this point  or whether you need to reboot.  Can't hurt to reboot so ...

Now plug in your pendrive. 

Once I did what I outlined above, my thumbdrives now show up in pacman-mod (I'm running Xfce), and once I click on the new drive, my user mounts it.

Maybe it will work for you.

Offline

#3 2011-03-12 04:49:03

lives2evil
Member
From: GMT+7
Registered: 2010-03-21
Posts: 244

Re: Can't give user access to optical or flash drive

How about try this?
Not very sure though smile

https://wiki.archlinux.org/index.php/Pc … ormal_user


tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ

Offline

#4 2011-03-12 18:32:57

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Can't give user access to optical or flash drive

ck-list-sessions. see if you have an _active_ session for your user.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB