On 01/10/10 11:34, Brett Parker wrote:
On 01 Oct 10:58, Ian Thompson-Bell wrote:
In the past I have found the easiest way to resolve permissions with sane is to log in as root and try scanning. Usually that works which confirms it is simply a permissions problem.
sane will also complain that you're root, ask if you're absolutely sure you want to do this, and warn you that if it kills your cat it's your own silly fault...
For a case of just looking at the permissions that the device has in /dev/bus/usb...
E.g. on this laptop I have a (working) finger print scanner, relevant line from lsusb: Bus 002 Device 002: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor
Permissions on the device: $ ls -la /dev/bus/usb/002/002 crw-rw-r-- 1 root plugdev 189, 129 Oct 1 11:14 /dev/bus/usb/002/002 $
Oh, look, that's read and writable by root and the plugdev group... so, what groups am I in? $ id uid=1000(brettp) gid=1000(brettp) groups=1000(brettp),20(dialout),24(cdrom),25(floppy),29(audio),44(video),46(plugdev),109(fuse),1002(sbox) $
Oh look, I'm in the plugdev group, so I have read/write on the fingerprint scanner! Well, that's handy... (given that I use it to auth to xscreensaver... along with a password fallback).
Permissions are *not* complicated, *are* central to the operation of a linux machine, and should be got to grips with early on.
If I hadn't been in the group then I'd have done: sudo adduser brettp plugdev
Which would have added me in to the group, I'd have then logged out and back in again to make sure that the group membership had taken, and then tried again.
This ain't rocket science. Use root *very* sparingly and always remember that running *anything* as root is a security risk.
I *think* I understand the stuff above but here's a typical problem for me.
I want to move stuff. In this case it's from a 1 gig SD card plugged into a reader. As me i.e. the 'normal' user, I select all the stuff on the card and now want to move it to my NAS drive. That's /mnt/server/...... and 3 directories down, I create a folder. When I come to paste the files, that option is greyed out. so how do I find out groups and stuff for that?
If I type ls- ls for /mnt/server/Epox.... it just returns with 'total 0' which tells me naff all.
If I do a 'id' as you did above, it tells me this :- gid=10001(chris) groups=10001(chris),500(raw1394),501(nas)
So I can see that I'm already in a nas group but why then am I not allowed to paste the files into the newly created folder?
*You* might not think it's rocket science but it sure beats the hell out of me sometimes ;-)