2013年12月18日 星期三

[Coding] 如何讓CGI有權限可以access /dev/input/ node

預設在Lighttpd當中的CGI,其groupname可能並沒有權限可以access /dev/input/當中的file node,而透過上篇說到的supplementary group,就可以讓CGI有額外的權限。

例子很簡單,只需要修改lighttpd.conf,加上下面這段即可
# It is used to support supplementary groups to let
# lighttpd have enough permissions to access resources.
# if necessary.
# NOTE:  s-groupnames is a array config type.
server.s-groupnames = ( "input" )

沒有留言: