Apache newbie questions

Discussion in 'Server Operation' started by valhalla, Sep 25, 2007.

  1. valhalla

    valhalla New Member

    Hi everyone!

    I've managed to setup my web server with tutorials and howtos from this site, but now I'm facing some problems I cant solve with howtoforge.com and google :D

    I have a lot of experience with MS based servers, based on win 2003, IIS 6 and lots of web sites on them, but there are some things I cant realise on linux...

    I know how generally things work under linux, but I would like to check something about file permissions.

    When I access a page on a web site hosted on linux server, and open up a page, permission that is checked is 'others', right? If 'others' dont have read access, that page can't be opened?

    How dangerous is it to leave eXecute permissions on files/folders in a web sites? (mostly html pages, maybe some .php scripts)

    Who should be owner of files on web sites - root? Or I should create a dummie-user for each web site and put him as owner?

    Thanks in advance...
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Usually the file is accessed by the Apache user (unless you use something like ssuPHP for PHP files or suExec for CGIs), so if the Apache user isn't the owner of the file or in the group of the file, you're right.

    Right.

    Folders must have execute permissions! They don't do any harm for files, although they aren't needed (unless it's a CGI script - CGI scripts must be executable).

    I'd use a separate user for each web site. You can then also use FTP with this user to upload files to the web site.
     

Share This Page