The "chown $console_user /dev/bus/usb/$bus_num/$dev_num" line in /usr/libexec/gphoto-set-procperm fails with chown: cannot access `/dev/bus/usb/002/018': No such file or directory A small delay before the chown command seems to fix the problem so it seems like the script is run before(during?) the device creation, it either needs to be called after the device has been created or it needs to spin for a while if the device isn't there yet (probably a bad idea).
FWIW, adding a delay before the chown doesn't help in my case. The selinux trace in 180751 indicates that there might be a policy problem with gphoto-set-procperm. Maybe we're chasing two bugs for this problem?
There should not be a race. Looks like se-linux is preventing /usr/libexec/gphoto-set-procperm from accessing /dev/bus/usb/.
How does that explain what Kostas is seeing then? In my case, selinux is enabled so gphoto-set-procperm might be getting stopped from doing its job. In his case though, adding a delay made the script set the permissions correctly. That must mean he has selinux disabled and still sees a problem?
Bringing back to HAL. Davidz says it is a kernel issue with HAL.
I am running with: SELINUX=permissive SELINUXTYPE=targeted so selinux isn't involved. I was running 1977_FC5 at the time so I just had a test with 1996_FC5 and the first try worked and the next 5 failed :( Let me know if you need more debug information.
Created attachment 125570 [details] Looping Hi Kostas, The above package works around the HAL/kernel issue by spinning as suggested. Can you verify that it does work around your problem?
Yes it seems fine, note that since I am in x86_64 system I just grabbed gphoto-set-procperm from the rpm so if there are other changes they aren't tested. I am not sure you need to spin around /proc/bus/usb/$bus_num/$dev_num since the chown was always succesful in my system but it's not going to hurt either.
Comment 6: This is not really the right solution. Will comment more tomorrow, am busy all night, sorry.
Yes, it's obviously not the *right* solution, but I guess a better question, is whether it's a *good enough* solution given that FC5 freezes on monday.
moving off fc5 blocker since we have a workaround in place now.
I'm also seeing problems with my digital camera with rawhide (2006-03-11) and kernel 2.6.15-1.2032_FC5. Ray Strode, should we open a new bug about SELinux preventing gphoto-set-procperm for doing its job? I couldn't find an open bug that discusses only gphoto2 vs. SELinux case which seems to be cause of my problems.
It's been a year without an update, is the workaround still needed?
This is fixed in Rawhide with latest HAL packages that manages permissions.