Find the answer to your Linux question:
Results 1 to 7 of 7
I decided to stop giving my money to Microsoft and work with Linux. So I'm new to the Linux world, though I know a couple of things about computers. But ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Location
    Metro Detroit
    Posts
    3

    Newbie mistake...


    I decided to stop giving my money to Microsoft and work with Linux. So I'm new to the Linux world, though I know a couple of things about computers. But today I was setting up an Apache/MySQL/PHP combo in Mandriva and somehow I messed it up.

    I had the default web page working fine so I decided I wanted to customize it. I tried to edit index.shtml but I didn't have permission so I chown'ed the /var/www/html directory to user:user. I was able to update the index file, but the browser started giving a 403 Forbidden Error I chown'ed the directory back to apache:apache but I still get 403.

    I've tried everything I can think of. I've read a few manuals, but they all want to play with the config file. Since I broke it without the config file, it seems like it should be fixable without the config file.

    Any thoughts out there?

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    How are the permissions of /var/www/html?
    ls -ld /var/www/html
    Also, how are the permissions of that index.html?
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  3. #3
    Just Joined!
    Join Date
    Apr 2005
    Location
    Metro Detroit
    Posts
    3

    Next Round

    Hi Serz.

    Well, in order to learn the system more I just went ahead and reinstalled the OS. It helped with a couple of issues and now the web access is fine again.

    So, to avoid making the same mistake twice, here's the question: What is the easiest way to give a user permission to add files to the var/www/html and still maintain Apache's function?

    When I used the Permissions from the control panel previously I gave user 'thomas' rights to everything. Magically that produced the 403 error, even after chown'ing the user back to apache.

    Should I only be moving files in there as Root? Should I update the config file? Should I try giving 'thomas' permission again?

    (Owner of var/www/html is apache:apache, owner of index.shtml is root:root)

    Thanks!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Well, what I'm thinking is you could change all the files in that directory to be under ownership of the "apache" group, and then add thomas to that group. Should work, I think? To do so, you would do the following as root:

    Code:
    cd /var/www/
    chown -R :apache html
    groupmod -a thomas apache
    This way, only users in the "apache" group could write to that folder, but thomas is a member of that group.

    Just make sure that the group permissions are set to writable. To do this if it's not already done, you could run:

    Code:
    chmod -R g+w /var/www/html/
    That's how I'd do it, and it should work.

  6. #5
    Just Joined!
    Join Date
    Apr 2005
    Location
    Metro Detroit
    Posts
    3

    Next attempt

    I'll give that a shot.

    Thanks for the advice, guys!

  7. #6
    Just Joined!
    Join Date
    Apr 2005
    Posts
    1

    How can I compile tetex 3.0 for Mandrake 10.0

    Hi!
    I am a newbie on LINUX, I have just installed MDK for a week! I only use (La)TeX to write my document. But I don't know how can I install tetex 3.0 on my system. Please help me!
    Thank for reading this message.

  8. #7
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908

    Re: How can I compile tetex 3.0 for Mandrake 10.0

    Quote Originally Posted by nvhanh
    Hi!
    I am a newbie on LINUX, I have just installed MDK for a week! I only use (La)TeX to write my document. But I don't know how can I install tetex 3.0 on my system. Please help me!
    Thank for reading this message.
    Create a new thread for your problem so we don't confuse things up. And when creating, try to use a descriptive subject and give as much information as you can.
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

Posting Permissions

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