Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 125272
Status: new
Priority: 0/
Queue: Net-Server

Owner: Nobody in particular
Requestors: andrew.maguire [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Running a daemon with multiple group permissions in Starman using
Date: Fri, 04 May 2018 19:30:37 +1200
To: bug-Net-Server [...]
From: Andrew Maguire <andrew.maguire [...]>
Download (untitled) / with headers
text/plain 1.5k
Hi, We are trying to start a starman service on Debian Jessie & Stretch. This uses --user and --group arguments but we want to start the service with multiple groups and the variable user interface levels just fail to handle this situation. The problem appears to be in the command line processing in Net::Server. TLDR; The simple solution is a one line change in Net::Server::post_bind() - } elsif ($prop->{'group'} =~ /^([\w-]+(?: [\w-]+)*)$/) { $prop->{'group'} = eval { get_gid($1) }; + } elsif ($prop->{'group'} =~ /^([\w-,]+(?: [\w-,]+)*)$/) { $prop->{'group'} = eval { get_gid($1) }; Long version ------------ The Net::Server::Daemonize::get_gid() interface allows for parsing of a string of gids that are both space and comma delimited. The Net::Server command parsing explicitly prevents setting of arguments with values that contain spaces, see process_args() line: if ($args->[$i] =~ /^(?:--)?(\w+)(?:[=\ ](\S+))?$/ so trying to use --group 'mygroup othergroup' does not work. Although I have not tried it, the same parsing is used if the configuration is read for a file instead of from command line arguments. In theory it should be valid to pecify the groups as a comma separated list --group 'mygroup,othergroup' This would work except that commas are not treated as a delimiter in Net::Server::post_bind() as described above. Thanks Andrew Ps. Also Net::Server::Daemonize::daemonize() appears to have a bug with starting a daemon with multiple groups but that interface is not used here. Name: Andrew Maguire Email:

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to