Skip to main content

Using su/sudo, best practices?

Comments

3 comments

  • cPanelMichael
    I can log in to shell as the user but of course some commands won't work due to permissions or whatever. Like I can't use Composer or delete some files or run other webdev tools.

    Hello, Could you provide an example of a specific command or action you can't complete as the account username? Thank you.
    0
  • zackw
    I was working with Composer this morning. It's possible it could have tried to edit something outside my user folder? But when I switched to root in order to run things, it loaded up all the files as root:root. So naturally when I was back in my normal user and needed to delete some files in the public web folder, it couldn't delete anything previously created as root. Obviously these are just permission issues with various files, but my underlying concern still stands. How can I just enable using sudo for my user? And if that is an insecure thing to do, how can I use root but not mess up file ownership when using root? A lot of people disable root access anyway, so where does that leave me being able to do anything at all "fancy" on my VPS like install software or whatever. I want to be able to have administrative use of my VPS, but I also want to maintain decent security. I just thought having sudo ability on my user account was essentially the "normal" way to do occasional server commands.
    0
  • cPanelMichael
    Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look. You can post the ticket number here and we will update this thread with the outcome. Thank you.
    0

Please sign in to leave a comment.