Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
howto:linux_non-root [2019/01/07 13:37] – [authbind] Mortifis | howto:linux_non-root [2020/03/23 18:53] – [setcap] Does not require libcap-dev2 digital man |
---|
| |
===== setcap ===== | ===== setcap ===== |
''setcap'' may be used to allow Synchronet (''sbbs'') for Linux to run completely as **non-root** user by explicitly allowing the binary to bind low ports using the command-line: | ''setcap'' may be used to allow Synchronet (''sbbs'') for Linux to run completely as a **non-root** user by explicitly allowing the binary to bind low ports using the command-line: |
| |
<code>sudo /sbin/setcap 'cap_net_bind_service=ep' /sbbs/exec/sbbs</code> | <code>sudo /sbin/setcap 'cap_net_bind_service=+ep' /sbbs/exec/sbbs</code> |
| |
This must be ran on the executable file itself (if ''/sbbs/exec/sbbs'' is a symlink, apply it to the target of the link instead). For example: | This must be ran on the executable file itself (if ''/sbbs/exec/sbbs'' is a symlink, apply it to the target of the link instead). For example: |
sudo setcap 'cap_net_bind_service=ep' ~/sbbs/src/sbbs3/gcc.linux.x64.exe.release/sbbs | sudo setcap 'cap_net_bind_service=+ep' ~/sbbs/src/sbbs3/gcc.linux.*.exe.*/sbbs |
| |
This will need to be re-ran any time the binary is rebuilt (and remember to properly reference ''.debug'' or ''.release''). | |
| |
This requires that the [[https://packages.debian.org/stable/libcap2-dev|libcap2-dev]] package be installed prior to building ''sbbs'' (or perform a //clean// build of ''sbbs'' after installing ''libcap2-dev''). See [[install:nix:prerequisites]] for details. | |
| |
| This will need to be re-ran any time the binary is rebuilt and can be automated by adding the ''setcap'' target to your ''make'' command-line executed in ''src/sbbs3'': |
| make RELEASE=1 setcap symlinks |
===== authbind ===== | ===== authbind ===== |
| |