Learn about Centmin Mod LEMP Stack today
Register Now

Install dmotd Permission denied - sudo users

Discussion in 'Install & Upgrades or Pre-Install Questions' started by hugup2, Oct 20, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    5:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Is this with 123.09beta01 ? it's probably how they configured sudo user. I have no problems with testing sudo user created via tools/addsudousers.sh


    web host ? plan ? server ?

    for cmdir switch to root to run it instead of sudo cmdir
     
  2. Andy

    Andy Active Member

    544
    89
    28
    Aug 6, 2014
    Ratings:
    +133
    Local Time:
    2:52 PM
    it's latest beta centminmod
    It's a private uni IT dept that I'm contracted to help maintain their server. Just get a new VM server with Centos 7.2 on it and the first thing I did is installing centminmod.
    Not sure how to proceed next.
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,458
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,841
    Local Time:
    5:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod wasn't made or tested for sudo command style. Sudo is supported as far as sudo switch to root user and then manage Centmin Mod via root user not sudo command.

    cd command is not an executable but a shell function and cmdir is an alias is not available to logged in sudo user but you can manually add support for cmdir at least - add this into your sudo user's /home/sudousername/.bash_profile file add to end of file
    Code (Text):
    alias cmdir='pushd /usr/local/src/centminmod'
    

    then log out of sudo ssh user session and log back in then cmdir shoudl work as sudo user logged in, but you still need to switch from sudo to full root user to run centmin.sh itself as it's owned by root user.

    Same with cd /home/nginx need to switch to full root user via sudo

    Basic Summary - you need root user access either via normal root or sudo user that can switch to full root user to run and use Centmin Mod.