Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Local camera not working - permission denied

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

Matehias

Member
Joined
Jun 20, 2020
Messages
31
Hi all,

First of all, I'm french speaker -> sorry if my english is at the level of a 5 year child ^^
I use Freenas for some months with Plex and Nextcloud plugins working well but I'm quite newbie yet.

I try literraly for days to use a local camera to watch my 3d printer with Octoprint (installed in a jail and working well too).

- My camera is an action cam (Denver AC-5000W) connected via usb, working as webcam on my Windows PC and recognized by The FreeNas system when plugged in : message on the Freenas screen.
- I tried a lot of config in ZM, especially for the source but the best result is :
2020-07-29 14:23:54zmc_dugen3_2101846FATFailed to open video device /dev/ugen3.2: Permission deniedzm_local_camera.cpp714
2020-07-29 14:23:44zmdc3685ERR'zmc -d /dev/ugen3.2' exited abnormally, exit status 255zmdc.pl

What i tried / did:
- Add a mount point to the Freenas /dev folder :
1596027495517.png

- Put devfs_ruleset to 3, enable mount_devfs, mount_fdescfs, allow_mount and allow_mount_devfs :

1596027379066.png
1596027393516.png


- Add the www user (seems ZM use this) to the group of the different dev files i tried to reach
- Put the permissions of these files to 777... I know its very bad but it was in desperation...


Don't hesitate to ask me more information if necessary.

Could you help me to resolve this ?

PS : if someone have a better idea than ZM, I take it ! I just need for Octoprint a stream URL or a path to FFMPEG :
1596027318806.png
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
1,931
Which version of FreeNAS? 11.3-U4 finally fixes jails always running with devfs_ruleset 5, regardless of what's configured in the jail settings.
 

Matehias

Member
Joined
Jun 20, 2020
Messages
31
Indeed, I use FreeNAS-11.3-U3.2 , there's something to know before upgrade ?

Edit : something strange : I manually create a jail with devfs_ruleset to 3 to install Octoprint ant it communicate well with the 3d printer connected by USB
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
1,931
Yes, try upgrading to U4, and you should have better luck with your devfs_rulesets actually taking effect.
 

Matehias

Member
Joined
Jun 20, 2020
Messages
31
Hi ! It seems that it has a positive effect because I don't have the Permission denied error but now I have this :
Failed to get picture attributes: Inappropriate ioctl for device

I tried to search for this error but I found concepts that are over my understanding : standard input/ouput, tty,...

Also, could you confirm that the path used is good to reach the webcam, something like /dev/usb/3.2.0 ? On all forums they talks about /dev/video but it seems that FreeNAS not working like other unix system...
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
1,931
USB devices can move around from boot to boot. Run usbconfig inside the jail to see what devices are available, and where they landed on this boot. You should use the /dev/ugenx.x device appropriate to the camera.

FreeNAS is built on FreeBSD, which isn't Linux.
 

Matehias

Member
Joined
Jun 20, 2020
Messages
31
Thanks for the tip ! There is the result of usbconfig inside the jail :

1596110113308.png


ugen1.2 is my 3d printer.
ugen3.2 is the camera.

There is the config in ZM :
1596111493896.png


But always the same error :
Failed to get picture attributes: Inappropriate ioctl for device
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
1,931
What other options are available for the Capture Method? The V4L video subsystem won't be available on FreeBSD.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
1,931
Please output usbconfig -d ugen3.2 dump_device_desc. This will show the USB vendor and product IDs.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
1,931
I don't know if you'll be able to get this to work. The USB ID database says 0x04fc/0x6333 is registered as a Siri A9 UVC chipset video device from Sunplus Technology Co., Ltd. The Linux UVC driver page doesn't list this device as supported for V4L2, but indicates it's likely to be supported if it fully implements UVC. Unfortunately, V4L2 uses different IOCTLs from V4L.
 
Top