FlowForwarding / LINC-Switch

OpenFlow Software Switch written in Erlang
http://flowforwarding.org
Other
213 stars 80 forks source link

LINC-Switch build fails on NFS (or other) file system without setuid/setcap permission #355

Open lantz opened 9 years ago

lantz commented 9 years ago

It appears that during the build the following command is run:

sudo setcap cap_net_admin=ep ./rel/linc/erts-5.10.4/bin/beam.smp

Most NFS mounts (along with other shared file system mounts) don't permit setuid/setcap to be set on executables (this is a recommended best practice for configuration), so this command, and the make, fails with a confusing error message:

==> rel (generate)
Failed to set capabilities on file `./rel/linc/erts-5.10.4/bin/beam.smp' (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
make: *** [rel] Error 1

It would be better if the build would actually complete and if you could either a) install the switch in a place like /usr/local/bin or /usr/bin, which are more likely to permit setuid, or b) if setuid/setcap fails, that the switch could be invoked using sudo if necessary

mentels commented 9 years ago

@lantz I updated generating the release. Now when setcap cannot be executed on a file the user will be instructed to run the switch with sudo. Does it work for you?