Re: usb device implemented with functionfs - must app run as root?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 05, 2017 at 10:09:35PM +0000, andy_purcell@xxxxxxxxxxxx wrote:
> I have implemented a USB device using functionfs.
> A colleague now says our app must run as a normal user, not as root.
> 
> I tried it and it does not work. 
> The problem is this - the endpoint files created by the OS are owned by root. 
> These ep files are created after I write the descriptors and strings to the /dev/usbffs/ep0 file. 
> 
> $ ls -l /dev/usbffs/
> total 0
> -rw-rw-rw- 1 xyzuser xyzgrp 0 Dec  5 21:36 ep0
> -rw------- 1 root    root   0 Dec  5 21:39 ep1
> -rw------- 1 root    root   0 Dec  5 21:39 ep2
> -rw------- 1 root    root   0 Dec  5 21:39 ep3
> 
> A normal user-space app cannot open, write, read, these ep files.
> 
> Is there a remedy for this?

Write a udev rule to change the owners of those files :)

You must have done that already for the ep0 file, right?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux