Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8499663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:43:42+00:00 2026-06-11T00:43:42+00:00

I am developing a control panel in PHP, i have the PHPsecLib libraries installed

  • 0

I am developing a control panel in PHP, i have the PHPsecLib libraries installed and am using it to issue commands to the remote servers.

For example;

$ssh->exec("cd /home/{$user}/{$id}; screen -S {$id} -A -d -m  java -Xmx768M -jar minecraft_server.jar nogui -nojline;"); 

Now my question is, because i am issuing the commands as root, is this a security threat, even when all the commands that are ran, are pre-made/hard coded and not from user inputs.

If this is an issue, could anyone advise the best way of doing it?

Thanks,
Harry

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:43:44+00:00Added an answer on June 11, 2026 at 12:43 am

    You would not want to run as root. Rather, to harden the platform a bit if you are using sudo:

    username    ALL = NOPASSWD: /bin/screen, PASSWD: ALL
    

    This would allow your user: username to run screen without the need of sudo/password, but still require authentication for the rest of the executables on the platform.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a graph control in WPF. I have previously developed it using GDI
Greetings, I am developing an Admin Control panel and I have to use ODBC
I'm developing a WPF application using MVVM. Inside a Window, I have a control
I'm developing a control which inherits from a System.Windows.Form.Panel. The idea is very simple:
I'm using Netbeans 7.0.1 in a PHP project. I've installed XAMPP 1.7 in Windows
Am developing an app which has a calculator function: for example, i have 4
I'm developing a Asp.net server control (inherited from DataBoundControl) and I have just one
I have been using windows XP. I installed visual studio 2008 and sql server
I have been developing a parental control software program for my company, but have
I have a client's Django project that I'm developing locally, using Mercurial for version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.