multisite Installer/Upgrader questions

scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Sat, 2007-04-07 21:50

I didn't take a bite into Multisite installations until 2.2-rc1 - I do have a question or two about the Installer/Upgrader in regards to how and when it detects "permissions" issues of the target directory (eg. /path/to/username/htdocs/gallery2/)

In all of the fresh multisite installations I created, the Installer would always detect a target directory that is writeable and it would put a notice (with a "recheck" or "continue" option) for you to take action upon. And everytime I encounter that notice (a good reminder for the careless admin), I would execute a small shell script to issue the following commands:

chown -R username:group /path/to/usr/home/username/htdocs/gallery2/
chmod 755 /path/to/usr/home/username/htdocs/gallery2/

the Installer would continue on and complete the multisite setup.

However, when I was converting standalone 2.1.2 sites to 2.2.1 multisites, that same "notice" would only appear at random. Before I open the Installer to begin the conversion process, here's what I do:

mv /path/to/usr/home/username/htdocs/gallery2/config.php /path/to/usr/home/username/.
mv /path/to/usr/home/username/htdocs/gallery2/.htaccess /path/to/usr/home/username/.
rm -R /path/to/usr/home/username/htdocs/gallery2/*
chmod 777 /path/to/usr/home/username/htdocs/gallery2/

the Installer runs as expected, then finally it would tell me to open the URL address of the new multisite (converted from a standalone) to run the upgrader instead (since it's not a fresh install) - i guess this is the default behavior since all it did was create the skeleton files and multisite config.php file (reusing the same ~/g2data/ and database info)
so I'm wondering if there's anything I'm doing wrong that's hindering the Upgrader to detect /path/to/usr/home/username/htdocs/gallery2/ as still being writeable - like it does with fresh multisite installations.

please advise, thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2007-04-07 22:25

the warning in the upgrader isn't about gallery2/, it's about the g2data folder and its contents, see:
FAQ: How can I fix the problem with the Storage Directory Permissions reported by the Upgrade Wizard?

btw:
your above chown / chmod commands don't touch g2data/, which is a little weird. i guess you want to include them in your chowning.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Sat, 2007-04-07 22:36

hrm, the multisite Installer requires a writeable target directory right or (manually create writeable skeleton files for it to write to (config.php, etc...)? cus the Installer notice (during a fresh multisite install) always advises me to "chmod 755 /path/to/usr/home/username/htdocs/gallery2/" (not ~/g2data) - but only appears at random during standalone -> multisite conversions.

the ~/g2data/ directory which resides on /path/to/usr/home/username/g2data/ already has a www:www / 777 permissions set so I never have to touch it

please advise, thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2007-04-07 23:02

sure, the installer is about gallery2/ if installing a multisite.
but the upgrade notice isn't specific to multisites. it's about g2data/ for the specific installation, multisite or not.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Sun, 2007-04-08 00:21

ok, so far, here's what I understand so please correct me if I'm mistaken:

the G2 Installer/Upgrader regardless if it's a standalone or multisite will always:

- after core is installed/upgraded, detect permissions set for the "target directory" -> if set to 777, output a notice to issue a "chmod 755 /path/to/gallery2/" -> [recheck] (if the admin took the action or [continue] buttons

- after core is installed/upgraded, detect whether "config.php" is writeable -> if set 666/777, output a notice to issue a "chmod 644 /path/to/gallery2/config.php" -> [recheck] (if the admin took the action or [continue] buttons

(i have yet to see this in my encounters) - detect permissions set for the "g2data directory"? -> output a notice/error

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-04-08 01:08

not quite.

@installer:
- multisite step: requires write access to multisite folder (if multisite installation)
- storage step: requires write access to g2data/
- config file step: requires write access to config.php
- security step: asks you to change gallery2/ and config.php to read-only, if they're writeable

@upgrader:
- system checks step: checks g2data/ folder and ~200 subfolders/files for write access. if not available, shows error and asks you to add write access. (g2data/ should always be writable by g2)
- upgrade core: if config.php update required, it asks you to make it writeable
- upgrade core (success page): asks you to change config.php to read-only, if it's writeable

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Sun, 2007-04-08 02:21

thank you!