Right way to set up Apache's file permissions

Discussion in 'Server Operation' started by marpada, Sep 25, 2008.

  1. marpada

    marpada New Member

    Hi,

    I've always wondered what is the right way to set up /var/www owner and group permissions for Apache. Maybe you guys could shine some light :)
    ________
    Gsx250Fx
    ________
    ROLL BLUNTS
     
    Last edited: May 13, 2011
  2. falko

    falko Super Moderator ISPConfig Developer

    Which distribution are you using? How did you install Apache?
    What are you trying to do? Does the directory need special permissions/ownerships?
     
  3. marpada

    marpada New Member

    I usually install PHP applications (Joomla, Drupal, php forums) in dedicated server using different distirbutions , but mainly Debian an CentOS. I don't know if I shoud chown the files/dirs to root, to apache's user. Sometime I have to give special privileges to all users for they to upload files, that's not my doubt.
    ________
    TRICHOMES
    ________
    WEED
     
    Last edited: May 13, 2011
  4. falko

    falko Super Moderator ISPConfig Developer

    If you upload files to that directory with FTP, you should chown it to the FTP user. If Apache needs to write to this directory, you should chown it to the Apache user. If you do none of these, then it doesn't matter as long as the Apache user can read from the directory.
     
  5. marpada

    marpada New Member

    So there's nothing wrong if I let root own the files? I mean, isn't a security flaw?
    ________
    Bdsm leather
    ________
    THE CIGAR BOSS
     
    Last edited: May 13, 2011
  6. falko

    falko Super Moderator ISPConfig Developer

    No, why?...
     
  7. marpada

    marpada New Member

    Don't know, just feeling paranoid ;)

    Thank you very much for your wisdom, Falko.
    ________
    Voyeur Bikini
    ________
    Ship Sale
     
    Last edited: May 13, 2011

Share This Page