Results 1 to 9 of 9

Thread: Can't copy file to Apache

  1. #1
    Join Date
    Apr 2009
    Location
    Liverpool, UK
    Posts
    6

    Default Can't copy file to Apache

    Hello,

    I have recently setup an Apache server and i am unable to copy a index.html file to the directory to check if it worked.

    It says error, then something about "i don't have permissions".

    This is my first time on SUSE so please excuse any rookie behaviour

    Thank you.

    Ryan.

  2. #2

    Default Re: Can't copy file to Apache

    RyRobbo wrote:
    > I have recently setup an Apache server and i am unable to copy a
    > index.html file to the directory to check if it worked.
    >
    > It says error, then something about "i don't have permissions".


    This is because you don't have permissions. Usually, the package
    apache2-example-pages should be installed, which includes a sample
    "It works!" page.

    Kind regards,
    Andreas Stieger

  3. #3
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    851

    Default Re: Can't copy file to Apache

    The owner of the directory where you want to put the file is probably root (or possibly apache). To put the file there, you have to become superuser.

    If you're in KDE, the easiest way to do that is to use System -> File Manager (Superuser Mode).

    Another way to do it is to be a member of the group for the directory where your Web pages will go (using File Manager (Superuser), once again). Right-click on the folder and check the permissions and ownership. Then use Yast -> User Management to make sure that you are a member of that group as well. One common approach is to use the group "wheel" or "apache." Make sure anyone in the group can write to that directory and you're covered.

    DO NOT give in to the temptation to make that directory world-writable (ie, anyone can write to it). DO NOT make that directory a member of the "users" group, either. This is a security feature built in to Linux. It's a pain when you're copying files, but it makes it much, much more difficult for a Bad Guy to tamper with your pages, too.

  4. #4
    Join Date
    Apr 2009
    Location
    Liverpool, UK
    Posts
    6

    Default Re: Can't copy file to Apache

    Thank you guys,

    I thought that if i added my account to the "root" group it would work but it never... so i will now add it the groups suggested, thank you.

    Im using GNOME by the way.

    Ryan.

  5. #5
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    851

    Default Re: Can't copy file to Apache

    I DON'T recommend that you add yourself to the "root" group. That could give a potential attacker way too much privilege, should he come into the machine as you.

    I'm a little confused, though. Maybe someone who's more familiar with Apache on Opensuse could pitch in, but most distros install it under a neutral user and group name (typically "apache").

    Unless you built it from source ... ?

  6. #6
    Join Date
    Jun 2008
    Location
    relative
    Posts
    1,172

    Default Re: Can't copy file to Apache

    Oh NO! It isn't to complicated. Adding yourself to the root group will lead to mysterious error, and they are leading by default to a reinstall.
    Have you tried this:
    Code:
    sudo chown <username>:users -R <apache directory>
    replace the <username> with your username, and the <apache directory> with the patch to the apache directory (/srv/www/htdocs?).
    http://mydailyhash.wordpress.com/
    http://yami.googlecode.com/

  7. #7
    Join Date
    Apr 2009
    Location
    Liverpool, UK
    Posts
    6

    Default Re: Can't copy file to Apache

    Ok ill unadd myself from the root group, and try that command line.

    Sorry i havn't posted my results, i will give all the help a go on monday.

    Thanks to everyone who has helped me.

    Ryan.

  8. #8
    Join Date
    Apr 2009
    Location
    Liverpool, UK
    Posts
    6

    Default Re: Can't copy file to Apache

    Also, i never built apache from source...i don't know how to with all the makefile etc... haha.

    I had it installed on my machine from one of the packages off the DVD version.

  9. #9
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Can't copy file to Apache

    Quote Originally Posted by RyRobbo View Post
    Also, i never built apache from source...i don't know how to with all the makefile etc... haha.

    I had it installed on my machine from one of the packages off the DVD version.
    That's the smart way to go. I don't understand people who try to compile from source or bring in a foreign LAMP stack when it's all provided in openSUSE if you know where to look in YaST.

Posting Permissions

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