Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Run a "Screen" session as a specific user

Discussion in 'General Discussion' started by Gaia, Nov 5, 2010.

  1. Gaia

    Gaia Registered

    Joined:
    Nov 5, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    Hi,

    I'm trying to keep an app running in the background under a specific userid. When I run "screen app_name" as root it keeps it running in the background.

    I enabled Normal Shell for a user, but still can't seem to run Screen as them, is there a specific option that needs to be open? Or anyway as root that I can force the screen session under their user?

    Each time I try to run it on the user account with Normal Shell, I get this error:

    Must be connected to a terminal.

    I can run the application without screen, but that would mean I would have to leave the SSH connection open(which I want to avoid).

    Thanks!
     
  2. InterServed

    InterServed Well-Known Member

    Joined:
    Jul 10, 2007
    Messages:
    261
    Likes Received:
    4
    Trophy Points:
    68
    cPanel Access Level:
    DataCenter Provider
    You might "su" as that user and then run the screen.

    Code:
    su - username
    screen 
    start application -> example ./user_application
    ctrl+d (to detach from the screen)
    ctrl+d (to exit su )
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice