Find the answer to your Linux question:
Results 1 to 6 of 6
I have 2 users on my account: root and tristan are the only 2 I use. Since I runa webserver, I use the GUI of RH 9 to edit my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Apr 2004
    Posts
    173

    Giving users same rights as root


    I have 2 users on my account: root and tristan are the only 2 I use. Since I runa webserver, I use the GUI of RH 9 to edit my documents. I always login under 'tristan' because I've customized that for myself. WHen I go to edit my webpages (/var/www/), I get a read-only error because I am not root. So, I have to logout, login as root, change the files there, logout, login as 'tristan' and then go on with my business.

    Is there any way to give 'tristan' permission to folders such as /var/ and/opt/ ? If not, is there a quick way to switch between 'tristan' and 'root' within the GUI without having to logout?

  2. #2
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    what you could do is change the place where your htdoc file is locatation where you can edit them or you could go into root and then chmod and chown the files so that your user can use them.
    Code:
    chown -R user wwwdirectory
    and
    Code:
    chmod -R 755 wwwdirectory
    i believe this is the right syntax for this if it doenst work you could try using the man pages for chown and chmod
    this is a better way around this then giving your user root permisions
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  3. #3
    Linux Newbie
    Join Date
    Apr 2004
    Posts
    173
    Thanx. I had tried
    Code:
    chmod 777 /var/www/html
    before I asked you, but that didn't help. This isn't the first time I've used linux, but the first time I've had to set permissions and more "in-depth" proceedures than I have ever done before.

    What exactly is the difference in chmod and chown...and why did I need to use -R?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    the -R makes every file and directory in side of the directory you are chmodding change permissions too. with out it only the maid directory will change
    and chown changed the ownership of the files and directories. chmod only changes the permission to read, write, and execute the files
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  6. #5
    Linux Newbie
    Join Date
    Apr 2004
    Posts
    173
    Bringing back one of my old old threads. Is it possible that 'chown' could cause issues with my server working? I mean, I recently did the following command:

    Code:
    chown -R tristan /opt/lampp
    That's the entire folder for the server. Now I seem to be having major server issues. Is there anyway to "undo" the 'chown' command?

  7. #6
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,933
    Quote Originally Posted by tristanlee85
    Bringing back one of my old old threads. Is it possible that 'chown' could cause issues with my server working? I mean, I recently did the following command:

    Code:
    chown -R tristan /opt/lampp
    That's the entire folder for the server. Now I seem to be having major server issues. Is there anyway to "undo" the 'chown' command?
    You cant 'undo' it, but imposing that user as owner of the files can limit some applications from accessing those directories and files. A good way to try and claw some of this back is to use something like:

    Code:
    chown -R root:users /opt/lampp
    Of course, if the application 'lampp' has its own user 'cos it runs a service as itself, then the fix could be as simple as:

    Code:
    chown -R lampp /opt/lampp
    I've never really had problems with permissions while I've been administrating my own Linux systems, they're quite logical, and it pays to spend some time in understanding them fully. The only time I get confused is when I forget who gets access to what...
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

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