Securing Gallery2

I run Gallery 2 for my picture gallery, and recently decided it was time to lock her down. What I have done follows.

Background

PHP Version 5.2.4
Windows Web Edition 2003 with IIS 6
Gallery 2.1.2
MySQL 5.0.45

Security Settings

Website Properties

Website Tab:

  • Enable Logging

    Home Directory Tab:

  • Read and Log Visits only
  • Application Name = (App specific name)
  • Execute Permissions = Scripts Only
  • Application Pool = (Separate Pool)

    Documents Tab:

  • index.php is only default content page

    Directory Security Tab:

  • Enable Anonymous Access enabled
  • Created local user (SERVER\anon)and placed it in guest group. Used this user as Anonymous User on site

    NTFS Permissions

    Website Root

  • Local Administrators = Full Control
  • SERVER\anon = Read and Execute
  • System = Full Control (not sure the total ramifications for pulling this access, and what exploit is possible by leaving it...todo)

    config.php

  • Inherited permissions
  • Read Only

    g2data folder

  • Local Administrators = Full Control
  • Folder is one level above Website Root

    From the Gallery pages

    * Read+Write+Execute for g2data and its subfolders
    * Read+Write for all files in g2data and the files in its subfolders (update...requires Modify NTFS perms)
    * Read+Execute for gallery2 folder and its subfolders
    * Read for all files in gallery2 and the files in its subfolders
    * Read+Execute for the binaries and the folder the binaries are in (imagemagick, netpbm, ffmpeg, dcraw, unzip, zip, ...)

    Performance Settings

    Website Properties

    Website Tab:

  • Enable HTTP Keep-Alives
  • Post new comment

    The content of this field is kept private and will not be shown publicly.
    • Web page addresses and e-mail addresses turn into links automatically.
    • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
    • Lines and paragraphs break automatically.
    • You may use [inline:xx] tags to display uploaded files or images inline.

    More information about formatting options