I've been poking around on the installer in HEAD and I noticed that if you don't give write access to the site folder (e.g. "default"), the installation stage on the shows"Verify Requirements" as checked. Since one of the requirements is that the site folder be given write access, I think that this page should show the installation stage as "Verify Requirements."

Also, in terms of usability, it might be better to have a "Continue Installation" button at the bottom of the page. As of right now you have to click the browser reload button to keep going (which might not be intuitive)

Currently, the page says this:

Drupal database setup
The following error must be resolved before you can continue the installation process:
The Drupal installer requires write permissions to ./sites/default during the installation process.

I think it would be better to say something like:

The Drupal installer requires write permissions to "./sites/default" during the installation process. After you have given the write permissions to the "./sites/default" directory, click the "Continue Installation" button to go on to the next step.

Comments

ff1’s picture

+1.

I raised this same issue here http://drupal.org/node/156984 before seeing this issue.

The exact wording perhaps needs some more discussion, but the basic solution is reasonably clear.

gábor hojtsy’s picture

Patches welcome! Note that the language selection screen uses links, so a link to reload the page might be suitable here too.

bennybobw’s picture

StatusFileSize
new1.87 KB

Patch attached with minimal changes.

bennybobw’s picture

Assigned: Unassigned » bennybobw
Status: Active » Needs review
StatusFileSize
new1.87 KB

Patch attached with minimal changes.

ff1’s picture

StatusFileSize
new87.89 KB

I installed the patch and it does exactly what is described. I've attached a screenshot of the patched error page.

The new code very similar to existing code within install.php and looks very clean. I see no reason not to commit this patch.

ff1’s picture

StatusFileSize
new77.81 KB

... and a screenshot of the unpatched error page.

ff1’s picture

Status: Needs review » Reviewed & tested by the community
gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Not bad. I agree we don't do database setup yet, so the requirements step should be selected. But the message needs some massage:

The @drupal installer requires write permissions to %file during the installation process. Please change the settings and click the link below to contine the installation

There is a typo in "contine" and IMHO the user should change the *permissions* not the *settings* of the file. Otherwise looks fine.

Standart’s picture

Title: If site folder doesn't have write access, "verify requirements" step is checked » Improve usability for write permissions check
Status: Needs work » Needs review
StatusFileSize
new1.51 KB

I removed the second sentence from the above patch. I think it is obvious that the user has to change settings and the words "continue" and "installation" don't need to be on this screen more than twice.

dries’s picture

Not escaping those variables in the URL looks a little dangerous to me.

Standart’s picture

StatusFileSize
new1.51 KB

I don't see the point with the variables as the code seems to be like it is in other places in the install.php. Created a new patch removing a space to comply with coding standards.

catch’s picture

StatusFileSize
new1.52 KB

One additional thing with this - if your settings.php isn't executable (i.e. 644 or 666) then you'll still get the not writable message.

I think it should say:

The Drupal installer requires write and execute permissions to "./sites/default"

patch attached.

gábor hojtsy’s picture

Erm, why would it need to be executable?

catch’s picture

That's what I thought, but I couldn't get the installer to go past that page without 755/777 permissions. Trying again now I see it may be a browser caching issue at my end, so sorry for muddying the waters, and ignore that last patch :(

gábor hojtsy’s picture

Huh, reread your comment. Of course directories need "execute" permission to be searchable. Sorry to misread your comment earlier.

catch’s picture

OK no problem, was just seeing what would happen if I took the message literally in a few different ways, but managed to confuse myself in the process, teach me to post late in the evening on a Sunday!

I think there's a fair chance that a drupal/*nix newbie might well do "chmod -R sites 666" from their drupal root once the see the error message, which won't allow them past this section of the installer, although ".sites/default" would still be writable. I don't know if my two word addition above is sufficient do deal with this, probably not.

Maybe some example chmod settings would help, as discussed in this (duplicate) issue: http://drupal.org/node/84229. That issue also had the suggestion that the permissions be writable by default (given the installer resets them at the end) - is that worth exploring? Would save most people seeing this message at all. I realise it's in INSTALL.txt but no-one reads that of course.

gábor hojtsy’s picture

Well, yeah people take instructions literally (eg. http://drupal.org/node/176039), so we need to be more specific.

bennybobw’s picture

Maybe it's too late because we're into beta, but I am still willing to go in there and add the suggestions.

What do you think?

bennybobw’s picture

Status: Needs review » Needs work

changed status to code needs work

Standart’s picture

Status: Needs work » Needs review
StatusFileSize
new1.68 KB

I think we need to decide if we want to provide detailed instructions with operating system dependent commands or if we prefer a short note.

One thing is clear though: It has to be improved and it should not get into Drupal 6.0 as it is right now. Why not commit a solid but short version first. There's always room for improvement.

I prefer to remove the "execution permissions". Just tell the user that the installer needs to write to that directory and to remove write permissions afterwards. Otherwise we have to tell the user every detail about unix permissions (how about windows?).

Attached is a cleaned-up patch. I thinks it's RTBC.

bennybobw’s picture

I don't know if we really need to detail instructions, but I do think we need to give a little more description, as per Gabor's suggestion.
What about something like

The Drupal installer requires write permissions to ./sites/default during the installation process. In order to do this, you need to change permissions of ./sites/default to 'write' and 'execute' for 'user', 'group' and 'other'. This can be done via a control panel on shared hosting or by typing 'chmod 777 ./sites/default' (without quotation marks) in the shell command line.

I took that from the other issue. The Drupal INSTALL.txt file only has Unix directions, so I assume we're sticking with that?

Also, if we change this, we may have to open another issue to change INSTALL.txt which says to use "chmod o+w default" (assuming you're in the sites director).

bennybobw’s picture

Whoops several typos/fixes.

The Drupal installer requires special permissions to ./sites/default during the installation process. In order to continue, you'll need to change permissions of ./sites/default to 'read' 'write' and 'execute' for 'owner', 'group' and 'other'. This can be done via a control panel on shared hosting or by typing 'chmod 777 ./sites/default' (without quotation marks) in the shell command line.

Standart’s picture

Priority: Normal » Critical

I think this is critical as most users will have to adjust permissions and will get stuck in the installation process then.

keith.smith’s picture

http://drupal.org/node/188449 is a related issue that has been marked as duplicate.
http://drupal.org/node/172398 is a related issue that has been marked as duplicate.

(http://drupal.org/node/172398 had discussion but no patches.)

mikey_p’s picture

StatusFileSize
new82.02 KB
new2.15 KB

I've re-rolled the patch from #20 (which wasn't applying cleanly) incorporating the text form #22.

stborchert’s picture

Status: Needs review » Reviewed & tested by the community

Tested and the patch worked as expected. If I don't modify the permission after checkout I get the new error message and after I change the permissions to 777 the installation continues.

One minor note:
All necessary changes to ./sites/default and ./sites/default/settings.php have been made, so you should now remove write permissions to them. Failure to remove write permissions to them is a security risk..
This message shows up on the install step "Configure site". Specifically the second sentence sounds somehow strange to me (as a none-native speaker).

greetings,

Stefan

catch’s picture

StatusFileSize
new1.27 KB

Quick followup patch for that wording, changes it to:
All necessary changes to %dir and %file have been made, so you should remove write permissions to them now in order to avoid security risks.

Leaving patch in #25 as RTBC since this doesn't affect it.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Please merge the patches you would like to have committed into one.

catch’s picture

Status: Needs work » Needs review
StatusFileSize
new3.03 KB

OK this a re-roll of #25 and #27. Marking to review for someone to look over my changes to the string.

mikey_p’s picture

StatusFileSize
new3.6 KB
new72.11 KB

I've rerolled the patch, to include instructions to the security warning, port installation. I've attached a screenshot of this warning.

Also the page title for the file/write warning (pre-installation) to reflect the install profile name.

mikey_p’s picture

This patch should probably wait on this http://drupal.org/node/190283

gábor hojtsy’s picture

mikey_p: I don't think that this patch should wait, as there is no overlap. JirkyRybka also noted at http://drupal.org/node/190283 that the settings.php error should display on the requirements stage, but this does not make the patches dependent.

gábor hojtsy’s picture

Status: Needs review » Needs work

Reviewed the code:

- some people suggested that we might be better off with linking to a page with documentation, instead of describing what needs to be done right there (I am not entirely sure this is better or worse).
- the current HEAD code already has a reload link for pages with errors (in theme maintenance), so this is superflous now
- IMHO use the title of the requirements page for requirements errors (probably better with "Requirements error", as introduced in the files folder issue)

catch’s picture

To me, a page with documentation would be much better than describing on-screen. A help page can give more/enough help for people on control panels etc., and saves displaying that information every time people install. Apart from the reminder, few people are going to need to hear this more than once.

ff1’s picture

I agree with catch: +1 for a link to a documentation page.

If you provide on-screen help using drupal messages, you may be able to help 20% of users, but may also confuse some of the other 80% in the process. By linking to documentation pages, you should be able to provide info for many different platforms/OS's/control panels etc., helping closer to 100% of users. Also, documentation pages can be changed quickly if the help text is found to be unhelpful after the release of D6.

mikey_p’s picture

I agree it's a little long, especially the post install warning to remove write permissions. In regards to linking to d.o documentation, my previous understanding was, that it is not best practice and undesirable. However I see that http://drupal.org/node/178581 now adds a link to the handbook from the installer. I"ll try to reroll this patch with links to appropriate handbook pages.

gábor hojtsy’s picture

Status: Needs work » Closed (duplicate)

Oh, now JirkaRybka made this a real duplicate, but of http://drupal.org/node/191310 So I'll tell him to look here for any possible improvements he can fold into his patch.