• mis2

    From Matt Bedynek@1:19/10 to All on Thu Oct 5 22:27:50 2017
    All,

    I run mystic under its own user name. I am able to start mis2 succssfully and it appears to fuction but I am not able to stop it.

    -bash-4.2$ ./mis2 daemon
    [MIS2] Executing servers in DAEMON mode

    (just a test ;-)
    -bash-4.2$ ./mis2 daemon
    ERROR: Mystic servers are already running.

    If this is not true, then the delete the following file and restart: /opt/mystic/semaphore/mis2.bsy

    -bash-4.2$ ./mis2 shutdown
    [MIS2] Note: This must be executed with SUDO or ROOT
    [MIS2] Sending shutdown signal for PID

    --8<-- truncated procses output
    15960 ? Ss 0:00 ./mis2 daemon


    It removes the busy file but the process never stops running. I would figure that as long as I try to stop it as the same user it is running I should not need to issue the stop as super user?

    Just passing along. Thank you.

    Take care,

    Matt

    ---
    * Origin: The Byte Museum - www.bytemuseum.org (1:19/10)
  • From Tony Langdon@3:633/410 to Matt Bedynek on Fri Oct 6 17:44:00 2017
    Matt Bedynek wrote to All <=-

    It removes the busy file but the process never stops running. I would figure that as long as I try to stop it as the same user it is running
    I should not need to issue the stop as super user?

    I always start and stop as the superuser.


    ... BEWARE - Tagline Thief is in the area...
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Matt Bedynek@1:19/10 to Tony Langdon on Fri Oct 6 19:11:44 2017
    Tony,

    Friday October 06 2017 17:44, you wrote to me:

    It removes the busy file but the process never stops running. I
    would figure that as long as I try to stop it as the same user it
    is running I should not need to issue the stop as super user?

    I always start and stop as the superuser.

    I haven't tested this but since I dont see a configurable option to fork to unprivleged user that this means always running as root. In the "industry" this is viewed as not good. What I do is configure my instances to listen on non-privleged ports (i.e. 2222) then forward 22 to that.

    Take care,

    Matt

    ---
    * Origin: The Byte Museum - www.bytemuseum.org (1:19/10)
  • From Nicholas Boel@1:154/10 to Matt Bedynek on Sat Oct 7 08:03:28 2017
    Hello Matt,

    On Fri Oct 06 2017 19:11:44, Matt Bedynek wrote to Tony Langdon:

    It removes the busy file but the process never stops running. I
    would figure that as long as I try to stop it as the same user
    it is running I should not need to issue the stop as super user?

    I always start and stop as the superuser.

    I haven't tested this but since I dont see a configurable option to
    fork to unprivleged user that this means always running as root. In
    the "industry" this is viewed as not good. What I do is configure my instances to listen on non-privleged ports (i.e. 2222) then forward 22
    to that.

    Mystic automatically forks to the unpriviledged user that the executable is owned by when started as root.

    Regards,
    Nick

    ... "Не знаю. Я здесь только работаю."
    --- GoldED+/LNX 1.1.5-b20170303
    * Origin: thePharcyde_ distribution system (Wisconsin) (1:154/10)
  • From Matt Bedynek@1:19/10 to Nicholas Boel on Sat Oct 7 16:28:34 2017
    Nicholas,

    Saturday October 07 2017 08:03, you wrote to me:

    Mystic automatically forks to the unpriviledged user that the
    executable is owned by when started as root.

    I didn't realize that. Thanks!

    Take care,

    Matt

    ---
    * Origin: The Byte Museum - www.bytemuseum.org (1:19/10)
  • From Matt Bedynek@1:19/10 to Nicholas Boel on Sat Oct 7 16:35:48 2017
    Nicholas,

    Saturday October 07 2017 08:03, you wrote to me:

    Mystic automatically forks to the unpriviledged user that the
    executable is owned by when started as root.

    Just changed my startup script to not issue those commands under the non-priv user and it does indeed fork correctly.

    The shutdown command however still has no effect to the running process (mis2).

    Are you using mis or mis2 on your setup?

    Take care,

    Matt

    ---
    * Origin: The Byte Museum - www.bytemuseum.org (1:19/10)
  • From Tony Langdon@3:633/410 to Matt Bedynek on Sun Oct 8 13:58:00 2017
    Matt Bedynek wrote to Tony Langdon <=-

    I haven't tested this but since I dont see a configurable option to
    fork to unprivleged user that this means always running as root. In
    the "industry" this is viewed as not good. What I do is configure my instances to listen on non-privleged ports (i.e. 2222) then forward 22
    to that.

    MIS and MIS2 actually drop privileges to the user/group that owns the binaries, so they're safe to start as root, provided root doesn't own them.


    ... OPCODE: MWAG = Make Wild-Assed Guess
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Robert Wolfe@1:116/17 to Matt Bedynek on Sun Oct 8 10:33:06 2017
    I always start and stop as the superuser.

    I haven't tested this but since I dont see a configurable option to fork to unprivleged user that this means always running as root. In the "industry" this is viewed as not good. What I do is configure my instances to listen o non-privleged ports (i.e. 2222) then forward 22 to that.

    To work around this, I grant the mystic user (the user I use for Mystic)
    sudo privs in /etc/sudoers and then while logged in as the mystic user
    issue the 'sudo ./mis2' command. That way all files are written and
    owned by the mystic user without having to use the root user to start
    and stop the process.
    --- Platinum Xpress/Win/WINServer v3.0pr5
    * Origin: Neptune's Lair - Olive Branch MS - winserver.org (1:116/17)
  • From Robert Wolfe@1:116/17 to Tony Langdon on Sun Oct 8 10:34:06 2017
    MIS and MIS2 actually drop privileges to the user/group that owns the binari so they're safe to start as root, provided root doesn't own them.

    But any Linux admin worth their salt knows that in case like this you
    NEVER want to use root -- but use sudo instead.
    --- Platinum Xpress/Win/WINServer v3.0pr5
    * Origin: Neptune's Lair - Olive Branch MS - winserver.org (1:116/17)
  • From Tony Langdon@3:633/410 to Robert Wolfe on Mon Oct 9 08:35:00 2017
    Robert Wolfe wrote to Tony Langdon <=-

    But any Linux admin worth their salt knows that in case like this you NEVER want to use root -- but use sudo instead.

    We're talking about starting from a startup script. Most daemons are started as root, and drop privileges. Sudo isn't normally used that way.


    ... Beliefs are extremely powerful. Make sure you question yours often.
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Robert Wolfe@1:116/17 to Tony Langdon on Mon Oct 9 10:35:00 2017
    Tony Langdon wrote to Robert Wolfe <=-

    But any Linux admin worth their salt knows that in case like this you NEVER want to use root -- but use sudo instead.

    We're talking about starting from a startup script. Most daemons are started as root, and drop privileges. Sudo isn't normally used that
    way.

    Ah, ok, that's a different story, then. I was thinking mis2 was being
    started once the system started up. My error.

    ... There cannot be a crisis today; my schedule is already full.
    ___ MultiMail/CYGWIN_NT-6.1 v0.50

    --- Maximus/2 3.01
    * Origin: Neptune's Lair * Olive Branch, MS * os2bbs.org (1:116/17)
  • From Jeff Smith@1:282/1031 to Robert Wolfe on Mon Oct 9 12:12:36 2017
    Hello Robert,

    Tony Langdon wrote to Robert Wolfe <=-

    But any Linux admin worth their salt knows that in case like this you
    NEVER want to use root -- but use sudo instead.
    We're talking about starting from a startup script. Most daemons are
    started as root, and drop privileges. Sudo isn't normally used that
    way.

    Ah, ok, that's a different story, then. I was thinking mis2 was being started once the system started up. My error.

    There are I believe several ways to accomplish the same task. While I also resist the use of root unless unavoidable I do on a rare occasion. But then do so in a specific and controlled manner.

    As regards loading Mystic I load MIS/MIS2 from a bash script upon system startup. In that script I load MIS/MIS2 using "Sudo". MIS/MIS2 loads as root binding to the necessary ports but then actually runs as the owning user.

    One possible problem with loading as root (Depending on program behavior) is that the program loaded might change some file/directory permissions to root since it was loaded as root.

    Jeff


    --- BBBS/Li6 v4.10 Toy-3
    * Origin: The Ouija Board (1:282/1031)
  • From Tony Langdon@3:633/410 to Robert Wolfe on Tue Oct 10 20:08:00 2017
    Robert Wolfe wrote to Tony Langdon <=-

    Ah, ok, that's a different story, then. I was thinking mis2 was being started once the system started up. My error.

    In my case, other than at startup, mis/mis2 are started as needed by a cron job running as root, as well as the startup script, after I've done an upgrade.


    ... You know you're getting old when the candles cost more than the cake.
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Steve Helferich@1:311/2 to Matt Bedynek on Fri Oct 6 17:02:10 2017
    On 10/05/17, Matt Bedynek said the following...
    All,

    I run mystic under its own user name. I am able to start mis2
    succssfully and it appears to fuction but I am not able to stop it.

    I usually can't get it to stop either. I figure out what the pid is and use the kill <pid> command.

    Immortal

    --- Mystic BBS v1.12 A34 (Linux/64)
    * Origin: Lightning BBS -- lightningbbs.com:2400 (1:311/2)