Find the answer to your Linux question:
Results 1 to 6 of 6
How would I give configuration permissions to a user without giving them the root password. I know this is bad, but I do everything as root, so I can do ...
  1. #1
    Just Joined!
    Join Date
    May 2005
    Posts
    21

    Giving users access to apache

    How would I give configuration permissions to a user without giving them the root password. I know this is bad, but I do everything as root, so I can do anything. A regular user account is so restricted in what it can do, it drives me nuts. However, I'm hosting a MUD for a friend, and now he wants to put a webpage on there, and I said thats fine if he can get it working, since I have never used it, and don't have time to figure it out right now, but I dont want to give him my root password. I feel stupid asking this question, because its a breeze to do in windows, but never had to do it on a linux based system. Can I add him to a group that will give him permission to do this? Any assistance is appreciated.

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    All you need to do is add the user to the apache group

    As root:
    Code:
    usermod -G apache username
    this will give them access to files which are in the apache group (which should be the config files etc of apache).
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Just Joined!
    Join Date
    May 2005
    Posts
    21
    That didn't work. I got back unkown group error. My server runs apache2, I tried the command with both apache and apache2 as the group name, both with the same error.

  4. #4
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    Ok, let's create the group useing groupadd
    Code:
    groupadd -f apache
    then say you want the group to have access to /etc/apache.conf then do
    Code:
    chgrp /etc/apache.conf
    and you can set the permisions the group has over that file with
    Code:
    chmod 770
    this wil give the owner (which is root in this example) read (4), write (2), and execute (1), permissions with the first number, the same to the group with the second number, and then no rights to anyone else
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  5. #5
    Just Joined!
    Join Date
    May 2005
    Posts
    21
    That was too easy, I should have been able to figure that out, but oh well

    Thanks for you help!

  6. #6
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    Glad you got it up and runnig, groups are a very useful thing
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •