I have a ZC0301 webcam connected to a USB port. As root, I can use it without any kind of problems, but no user on my machine is able to "detect" the camera.
Is this a permission problem?
How can I solve it?
I have a ZC0301 webcam connected to a USB port. As root, I can use it without any kind of problems, but no user on my machine is able to "detect" the camera.
Is this a permission problem?
How can I solve it?
If you look around, you'll find answer that doesn't work for Fedora10, with eventually a dangerous one about udev rules that could hang your system!
http://forums.fedoraforum.org/showthread.php?t=211176
http://forums.fedoraforum.org/showthread.php?t=177859
http://forums.fedoraforum.org/showthread.php?t=94775
http://forums.fedoraforum.org/showpo...19&postcount=4
Since F10 hasn't got 50-udev.rules anymore, and that the solution here:
http://www.linuxquestions.org/questi...sions.-701934/
looks the same but Fedora rc.d structure of file isn't standard & you can't just apply the solution to all usbfs sytem,
I decided to treat the webcam as a complete alien, since that's how Fedora is taking it anyway;
Solution pumped from here:
http://forums.nxtasy.org/index.php?s...23&#entry16723
&& simplified here:
http://wiki.zenerves.net/index.php/Nxt::usb
It's the recipe to hook the NXT Intelligent Brick from the LEGO MindStorm robotics system to your computer via USB and a special set of rules.
[FYI: http://mindstorms.lego.com]
If I was able to connect to something as utterly unknown to my system, as user, sure I can find there a recipe to hook this freaking webcam, no?
Follow me, at your own risks: I consider this a poor hack, but it works, including after Suspend/Resume, which was my issue since a simple chmod a+rw /dev/Video0 in the /etc/rc.d/rc.local file was enough to get proper permissions upon start-up but not to keep them after suspend/resume:
!ALL done as root!
1. Plug cam (if not integrated, duh!), open terminal, as root:
returns a list of plugged devices, my laptop returns:lsusb
What's important here today is 174f, 6a33 and Syntek; we'll need them later: write it down, or, simply, open another root terminal to continue, keeping these info at hand for later.Bus 002 Device 002: ID 174f:6a33 Syntek Web Cam - Asus F3SA, F9J, F9S
The ID Vendor is the first number, here it is 174f
The ID Model is the second number, here it is 6a33
The Name of Product here is the one we'll use as name for the special Group Syntek
2. Terminal job again, let's create the needed group and link it to the user(s), as root:
It is probably sane to add root and any other user of this computer's webcam to the group by repeating the procedure above.groupadd <YourWebcamNameHere>
usermod --append --groups <YourWebcamNameHere> <Your User Name>
Obviously, I did usermod --append --groups Syntek f10 where Syntek is the name of my camera and the special group created on purpose here and f10 is the username we use on this Fedora10 laptop.
You can check this with, as root ever:
Which should return the names of the group your user name belongs to. Unless this is properly set up, there is no need to keep going further;id <Your User Name> -Gn
Notice that Fedora/Gnome has a GUI tool to manage that, one may feel more comfortable with: System->Administration->Users And Group. (You can at least use this to check if your user is registered with your new group)
3. Now as root, again, create with a text editor (gedit or kate or mousepad or VIM), a file called
45-<YourWebcamNameHere>.rules
insert the following in the file; don't forget to ADAPT to your webcam ID vendor, ID product and Name, especially since it is your Group Name too, and we need to attach this device to that group once and for all:
You can do:
or, if you know VIM,gedit /etc/udev/rules.d/45-<YourWebcamNameHere>.rules
Contents of file to be the new rule:vim /etc/udev/rules.d/45-<YourWebcamNameHere>.rules
What I had to do in real life (as root, from the /etc/udev/rules.d folder too):SUBSYSTEM=="usb_device", ACTION=="add",
SYSFS{idVendor}=="<YourID VendorHere>" ,
SYSFS{idProduct}=="<YourID ModelHere>",
SYMLINK+="<YourWebcamNameHere>-%k",
GROUP="<YourWebcamNameHere>",
MODE="666"
So for your reference mine look like this:vim /etc/udev/rules.d/45-Syntek.rules
Check your new file called 45-<YourWebcamNameHere>.rules. You can do so with:SUBSYSTEM=="usb_device", ACTION=="add",
SYSFS{idVendor}=="174f" ,
SYSFS{idProduct}=="6a33",
SYMLINK+="Syntek-%k",
GROUP="Syntek",
MODE="666"
Which should print the contents of your new file in the terminal.less /etc/udev/rules.d/45-<YourWebcamNameHere>.rules /etc/udev/rules.d/
What's in this file anyway?
This file is read upon startup, and it takes action in a precise way (that is why it is not dangerous, because it only speaks to one device):
SUBSYSTEM=="usb_device", ACTION=="add", -- we are speaking USB, and specifically what to do with it
SYSFS{idVendor}=="174f" , -- This is the brand,
SYSFS{idProduct}=="6a33", -- This is the model, these are unique descriptor to hook to the target,
SYMLINK+="Syntek-%k", -- That is to Link the actual device to the proper /dev/ tree where I'll have permissions to read,
GROUP="Syntek", -- This is my groupname with special permissions for me to access the webcam,
MODE="666" -- The 666 is the permissions as Read/Write for everybody;
The whole lot is to me just self-explanatory gibberish that I copied and pasted, successfully over 3 different computers to gain access to my Lego Mindstorms Brick, so I know the above procedure isn't dangerous & you know I still play with Legos.
You can check perms of your device after full reboot with:
and you should have tons of /dev/webcam-something if you dols -l /dev/vide*
ls /dev/<Your Webcam Name Here Minus The Last Letter>*
Regarding this hack, I say it's safe, but that's only me saying so, a simple user with very few posts, so if you don't understand this, DON'T DO IT! Never trust no-one that tries to trick you into firing up scripts or command-lines inputs in a terminal blindly.
Review the above, ask others, make up your mind. A said earlier, it's a poor hack that is targeted at enabling one single particular, obviously alien, device to the Linux usb subsytem. If the system wasn't broke in the first place, we wouldn't need to fix it so poorly with such lack of skills.
I say it's safe, it works. You shouldn't believe what anybody says
Cheers
Jean-Philippe
Last edited by Peacepunk; 11th April 2009 at 07:23 PM. Reason: refinements
Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
Shakespeare "Halmet" Act IV, Scene 4Registered Linux user number 418565
I'm not even using Fedora anymore (damned Mandriva!), but when I come back with the eleventh version, this will be very useful. Thanks a lot for your answer!
The fact that your post stayed unanswered for so long says a bad lot about this place I'm afraid.
[As it happens, I am on Slackware 12.2 now - Don't upgrade unless really, badly needed - My Logitech QuickCam Communicate STX was perfect with GSPCA on 2.6.23 (self-compile), then they integrated GSPCA to the official kernel and it doesn't work anymore! I want to bite somebody!]
Peace. Love, and ZEN computing to you all.
Jean-Philippe.
Last edited by Peacepunk; 13th February 2009 at 09:57 AM.
Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
Shakespeare "Halmet" Act IV, Scene 4Registered Linux user number 418565
I followed you process... But the red line that I am stuck at...
The red line, I click... System > Administration > Users & Groups.
Click "Add Group" the enter <YourWebcamNameHere> and leave unmark (specify group ID manually)
You mentioned double check, ordinary user is a member of the <YourWebcamNameHere> new group you just created. Is my user section show up after created new group? I showed only one ??
The purple one... I believe i didnt follow the instruction. When you said to create a file to 45-webcamname.rules, but it showed a folder instead?? Will you please tell me how to make file not folder??
Last thing...
When I go /dev/webcam, it come upwhen I am on root or without root, I typed webcam, but I got same error...Code:bash: /dev/webcam: No such file or directory
I am on FC 10...
[EDIT: Extensively rewrote the main post, please try again... before posting again!]
Updated to CLI mode of managing/adding Group and User.
Updated the "create file in /etc/udev/rules.d" part for more clarity too
Added content description of the udev script;
================================================== ============================
One way is, terminal as root:The purple one... I believe i didnt follow the instruction. When you said to create a file to 45-webcamname.rules, but it showed a folder instead?? Will you please tell me how to make file not folder??
Will give you a traditional text editor where it will be easy for you to copy and paste my sample file and to adapt to your needs.gedit /etc/udev/rules.d/45-<YourWebcamNameHere>.rules
if needed,
Please post the result of lsusb AS ROOT,
Please post the output of id <your username here> AS USER.
Please post the output of id <your username here> -Gn AS ROOT.
I will be able to help more.
The latest problems are because the preliminary steps where not completed.
Cheers.
[EDIT: Extensively rewrote the main post, please try again... before posting again!]
Last edited by Peacepunk; 13th February 2009 at 09:55 AM.
Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
Shakespeare "Halmet" Act IV, Scene 4Registered Linux user number 418565
I will get back with result in the evening... One thing I wanted to ensure that my webcam and laptop are communication well...
when I enter lsusb, it responds... however, when I enter /dev/video0, it said not found?? I wonder what difference between those two??
After I edit to give a permiission, will /dev/video0 show up??
Thanks!
I can help you be sure you can access the device, but if it is located in a non-standard location you may have to ask/check elsewhere, preferably with a new thread, after we sorted the permissions out.
You can't just "go" for /dev/video0 or "do" or /dev/video0; your proper checking method is
ls -l /dev/vide*
Which literally means LiSt -Long, detailed /dev/videANYTHING - But there is no sense in doing that as long as you haven't succeeded in the above and fully rebooted your system!
Cheers.
Last edited by Peacepunk; 13th February 2009 at 07:00 PM.
Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
Shakespeare "Halmet" Act IV, Scene 4Registered Linux user number 418565
I followed you steps smoothly after full reboot (shutdown) and wait 5 minutes to pray it will work... After boot up, and tested ls - /dev/vide*... The outcome is failed...
$ ls -l /dev/vide*
ls: cannot access /dev/vide*: No such file or directory
Worse case, my internet and email are not working... I can see my wireless is running... but can't do firefox or emails
So, I had to remove 45-Microsoft-rules... Then reboot, and my internet and emails are restored.. whew..
My webcam is Microsoft VX-3000...
?? Doesn't make sense ??
It is NOT ls - /dev/vide*... Once and for all it is ls -l /dev/vide*
Please post:
result of lsusb AS ROOT,
output of id <your username here> AS USER.
output of id <your username here> -Gn AS ROOT.
output of ls -l /ect/udev/rules.d/45-Microsoft.rules
output of less /etc/udev/rules.d/Microsoft.rules AS ROOT.
Your 45-Microsoft.rules should look as follow:
(ADAPT TO SUIT YOUR SYSTEM!)
[But you of course could have chosen another name
SUBSYSTEM=="usb_device", ACTION=="add",
SYSFS{idVendor}=="<YourID VendorHere>" ,
SYSFS{idProduct}=="<YourID ModelHere>",
SYMLINK+="Microsoft-%k",
GROUP="Microsoft",
MODE="666"this ne looks silly]
Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
Shakespeare "Halmet" Act IV, Scene 4Registered Linux user number 418565
Ok, let me check again at home, as right now, my laptop unable to connect internet and email... Right now, I am at work and will be home about before earlier evening...
As Product Name... Ha... I will change from M$ to be more creative since i followed your instruction and didn't think of it ha... One more thing, I wanted to be ensure that I input correct information... The step #2:
So, username is what I can make up for identify me as user on this laptop? because i am only one that using my laptop without any addition users or guests... I will be right back with post information...2. Terminal job again, let's create the needed group and link it to the user(s), as root:
id <Your User Name> -Gngroupadd <YourWebcamNameHere>
usermod --append --groups <YourWebcamNameHere> <Your User Name>
It is probably sane to add root and any other user of this computer's webcam to the group by repeating the procedure above.
Obviously, I did usermod --append --groups Syntek f10 where Syntek is the name of my camera and the special group created on purpose here and f10 is the username we use on this Fedora10 laptop.
You can check this with, as root ever:
Thanks
Last edited by Penguins007; 14th February 2009 at 03:43 PM. Reason: addition information
yes, that is right. sometimes username is not what login screen shows; we need here the linux username you gave when you installed the system; do AS USER in a terminal, if you are not sure:
users
It will show the name of anybody logged to your system; if there is only you then it is easy to get your username.
It also usually shows in a terminal, showing [username@machine ~] at the cursor position - on my laptop, the user is currently f10 (just because we use Fedora10, that's all!) and the machine is called F9E (because it is an Asus F9E, duh!). The names I use are not important, only you need to provide the good information for others to help.
Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
Shakespeare "Halmet" Act IV, Scene 4Registered Linux user number 418565
output of id username as user:
output of id username I id username -GnCode:uid=500(dmzeplin) gid=500(dmzeplin) groups=500(dmzeplin),501(LaserVideo)
So, I continue input information in editor and saved. The outcome:Code:dmzeplin LaserVideo
UBSYSTEM=="usb_device", ACTION=="add",Code:less /etc/udev/rules/.d/45-LaserVideo.rules /etc/udev/rules.d/
SYSFS{idVendor}=="045e",
SYSFS{idProduct}=="00f5",
SYMLINK+="LaserVideo-%k",
GROUP="LaserVideo",
MODE="666"
Last edited by Penguins007; 15th February 2009 at 02:00 AM. Reason: changed due to different results
After reboot.....
~] $ ls -l /dev/vide*
Output: ls: cannot access /dev/vide*: No such file or directory
~ ] # ls -l /dev/vide*
Output: ls: cannot access /dev/vide*: No such file or directory
Last edited by Penguins007; 15th February 2009 at 02:04 AM. Reason: changed results
do:
do:ls -l /dev/LaserVide*
lsmod|grep videolsmod|grep gspca
Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
Shakespeare "Halmet" Act IV, Scene 4Registered Linux user number 418565