The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    255
    Likes Received:
    2
    Trophy Points:
    18
    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