That's normal and expected - the mis daemon will need to be launched as root in order to bind the TCP ports, but only uses root for this
purpose. After the ports are bound, it will run the daemon using the
user account that owns the mystic directory. You can confirm this by running:
On 11-03-19 00:14, ryan wrote to lemonlime <=-
I'm not 100% sure that's the issue discussed here, but if it is, I'm personally strongly against starting any process as root that should
run in userspace. There are two other options. One is to bind to non privileged ports and then set up your firewall to do port forwarding.
This option has few drawbacks, if any, but you have to open multiple
ports on your firewall. Not sure if that matters much. The other option
is to allow 'mis' to bind to lower ports. This is the option I use, and
I use my bbs user.
I noticed when beginning mis as root, certain environment variables
would be screwed up and things like dosemu wouldn't work appropriately. That may be the problem we're dealing with here.
I'm not 100% sure that's the issue discussed here, but if it is, I'm personally strongly against starting any process as root that should run in userspace. There are two other options. One is to bind to non privileged ports and then set up your firewall to do port forwarding.
This option has few drawbacks, if any, but you have to open multiple
ports on your firewall. Not sure if that matters much. The other option
is to allow 'mis' to bind to lower ports. This is the option I use, and
I use my bbs user.
I noticed when beginning mis as root, certain environment variables
would be screwed up and things like dosemu wouldn't work appropriately. That may be the problem we're dealing with here.
Interesting - how did you allow mis to bind to lower ports out ofcuriousity?
I'd love to try this as well.
I'm not 100% sure that's the issue discussed here, but if it is, I'm personally strongly against starting any process as root that should
Though starting as root then dropping privileges is an established practice.
run in userspace. There are two other options. One is to bind to non privileged ports and then set up your firewall to do port forwarding. This option has few drawbacks, if any, but you have to open multiple
One big drawback - what if there's no NAT router? You either have to setup some rules in iptables or put up with non standard ports. Some of us actually have public IPs for their BBSs and there's IPv6 (which is generally public). :)
ports on your firewall. Not sure if that matters much. The other opti is to allow 'mis' to bind to lower ports. This is the option I use, a I use my bbs user.
I use this option as well these days, mainly because then all my BBS management can be done as the user and not having to switch to root just to start or stop the system. :)
Interesting - how did you allow mis to bind to lower ports out of curiousity? I'd love to try this as well.
On 11-03-19 09:50, ryan wrote to Vk3jed <=-
Though starting as root then dropping privileges is an established practice.
Agreed, though most processes that do this don't fork off and run other processes, like python or dosemu. That's where I ran into issues, personally, and why I decided I wasn't a big fan of doing that for a
BBS.
Yep, sorry to make assumptions. I have hosted my BBS on a cloud VPS for
so long I have actually forgotten what it's like to let clients inside your firewall :P Managing stuff with iptables (especially if you use
ufw) is pretty straightforward, though.
ports on your firewall. Not sure if that matters much. The other opti is to allow 'mis' to bind to lower ports. This is the option I use, a I use my bbs user.
I use this option as well these days, mainly because then all my BBS management can be done as the user and not having to switch to root just to start or stop the system. :)
Yep, this is what I do. It streamlines modding, startup/shutdown, etc. It's really the best option and IMO should be part of the mystic docs.
I believe I ran
setcap 'cap_net_bind_service=+ep' /mystic/mis
I reserve the right to be wrong but searching for setcap as a solution will get you moving in the right direction. The drawback here is now mis can do whatever it wants. The alternative could be per-port
configuration with something like authbind.
On Linux:
setcap cap_net_bind_service=+ep /path/to/program
Yep, this is what I do. It streamlines modding, startup/shutdown, etc. It's really the best option and IMO should be part of the mystic docs.
I believe I ran
setcap 'cap_net_bind_service=+ep' /mystic/mis
I reserve the right to be wrong but searching for setcap as a solution will get you moving in the right direction. The drawback here is now mis can do whatever it wants. The alternative could be per-port
configuration with something like authbind.
I noticed when beginning mis as root, certain environment variables
would be screwed up and things like dosemu wouldn't work appropriately. That may be the problem we're dealing with here.
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 31 |
Nodes: | 8 (0 / 8) |
Uptime: | 203:20:19 |
Calls: | 2,083 |
Calls today: | 1 |
Files: | 11,139 |
Messages: | 948,000 |