It is currently Sat May 25, 2013 7:42 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: UDEV Permissions changing from root only access
PostPosted: Fri Apr 21, 2006 6:59 pm 

Hi All,

I have an old dc2xx digi camera.  I have installed and configured gphoto2 and libgphoto2.  I know it works as only root can get pictures from the camera.  But I would like none root users to be able to access the camera.

How is this done?

I know that a new device is created in /dev.  I have looked at the output in console for udevevent - or something like that.  I'm not in zen at the moment so I cant say with exactness what it is.  I have looked through the forums.  I have googled.  I have added a permissions.d directory to /etc/udev and created a udev.permissions file with entries that I have taken from the web that maybe correct.  I have created a camera group and placed myself in that group.

What else can I do?

I am using zen 2.4.

Hope someone can help.

All the best and thanks in advance for any tips.

jetblack


  
 
 Post subject: Re: UDEV Permissions changing from root only access
PostPosted: Sat Apr 22, 2006 2:59 am 
Regular Zenwalker
Regular Zenwalker

Joined: Sat Apr 22, 2006 2:41 am
Posts: 17
Probably :
      /etc/fstab
none    /proc/bus/usb      usbfs      defaults,devmode=0666      0  0


 Profile Send private message  
 
 Post subject: Re: UDEV Permissions changing from root only access
PostPosted: Sat Apr 22, 2006 10:28 am 

Quote:
Probably :
      /etc/fstab
none    /proc/bus/usb      usbfs      defaults,devmode=0666      0  0


I tried above but it did not work.

However, I have reinstated hotplug, by commenting the line in /etc/rc.d/rc.udev that disables hotplug, and installing the hotplug package.  Now I can access the camera.

I just wish that the developers of zen would not rush ahead with new technologies and whatever before there is enough info on the web to be able to give instructions on how to use the said new tech.

Apart from that the developers are doing a good job -- its the only crit. I have.

jetblack


  
 
 Post subject: Re: UDEV Permissions changing from root only access
PostPosted: Mon Apr 24, 2006 9:02 pm 
Senior Zenwalker
Senior Zenwalker

Joined: Sat Mar 11, 2006 4:58 pm
Posts: 457
Location: blueplanet
try adding your user to the group that can access the device


 Profile Send private message  
 
 Post subject: Re: UDEV Permissions changing from root only access
PostPosted: Mon Apr 24, 2006 10:26 pm 
Dev team
Dev team

Joined: Fri Mar 10, 2006 11:17 am
Posts: 2099
mykey wrote:
try adding your user to the group that can access the device

Not good its currently owned by root.root
so mayber add
Code:
chgrp -R video /proc/bus/usb/0

to /etc/rc.d/rc.local. Thus it will be executed after every startup.


 Profile Send private message  
 
 Post subject: Re: UDEV Permissions changing from root only access
PostPosted: Wed Apr 26, 2006 6:10 pm 
Regular Zenwalker
Regular Zenwalker

Joined: Wed Apr 05, 2006 10:36 pm
Posts: 24
Permissions for udev are set in
  /lib/udev/usbmount.sh

Just edit!


 Profile Send private message  
 
 Post subject: Re: UDEV Permissions changing from root only access
PostPosted: Wed Apr 26, 2006 8:23 pm 

Thanks jonolte,

Quote:
Permissions for udev are set in
  /lib/udev/usbmount.sh

Just edit!


Looking at the above file the only line which I think has anything to do with being able to change permissions is

Code:
# Default values for configuration variables.
DEVNAME="$2"
MOUNTPOINTS="/mnt/usb /mnt/usb1 /mnt/usb2 /mnt/usb3 /mnt/usb4 /mnt/usb5 /mnt/usb6 /mnt/usb7"
MOUNTOPTIONS=" noauto,user,rw,owner,exec,uid=0,gid=100,umask=0"
VERBOSE="no"

umask 000


And of this I would guess that the "uid=0" is for root, as having looked at the /etc/group file root =0.  So if I am correct than this would be changed to whatever the uid is of the group I want to use for the camera.

Quote:
chgrp -R video /proc/bus/usb/0
to /etc/rc.d/rc.local. Thus it will be executed after every startup.


I will try this aswell mykey.


  
 
 Post subject: Re: UDEV Permissions changing from root only access
PostPosted: Sun Apr 30, 2006 12:49 pm 

Quote:
chgrp -R video /proc/bus/usb/0
to /etc/rc.d/rc.local. Thus it will be executed after every startup.


Tried this and it only partially works.  On fresh boot the group is set to video, but for any subsequent additions - when plugging in camera - it resorts to root.root for the new entry.  Even if you do sh /etc/rc.d/rc.local the device is unusable for ordinary user.

Looking at

Quote:
# Default values for configuration variables.
DEVNAME="$2"
MOUNTPOINTS="/mnt/usb /mnt/usb1 /mnt/usb2 /mnt/usb3 /mnt/usb4 /mnt/usb5 /mnt/usb6 /mnt/usb7"
MOUNTOPTIONS=" noauto,user,rw,owner,exec,uid=0,gid=100,umask=0"
VERBOSE="no"

umask 000


I have a feeling that this is for usb devices that are mounted in /mnt not in /proc/bus/usb.  Anyway changing permissions here had no effect.


  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


 Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
 
cron