I can't install drupal8 in a non english language due to folder permission issues. (can't make it executable)
I never had this problem with the files folder during installation.

I changed this block of code

  // Get values so the requirements errors can be specific.
  if (drupal_verify_install_file($translations_directory, FILE_EXIST|FILE_WRITABLE, 'dir')) {
    $readable = is_readable($translations_directory);
    $writable = is_writable($translations_directory);
    $executable = true;//is_executable($translations_directory);
    $translations_directory_exists = TRUE;

Why should the directory be executable?
Without that check everything works just fine.


YesCT’s picture

Lets try an initial patch to take out the check for dir exec.
Be sure to do a fresh git pull --rebase as this just went in.

We can see what the test bot says.

YesCT’s picture

steinmb’s picture

new30.7 KB

Coming from issue mention in #2 and I just copy these to was cross-posted there. We might just expand this issue to address this as they are related.

Test env

PHP 5.3.x
Server version: Apache/2.2.22 (Unix)
OS X 10.8.x

things to fix

After choosing another language then English.

At this point is is both 'files' and 'translation' directories missing. Not sure if new users understand that they need to create both without us telling them to do this.

If the missing directories then then is created but apache lack write access do we still claim that the directories are missing, instead of telling the user that they exist but we are lacking write access like we normally do (example in the next installation step).

The original problem related to windows have I no way of testing.

lang install

Sutharsan’s picture

YesCT’s picture

Status:Active» Needs review
new2.29 KB
PASSED: [[SimpleTest]]: [MySQL] 49,285 pass(es).
[ View ]
new1.36 KB

here is a patch that takes out checks for executable on the translations dir.

I tested with this patch on my Mac, if the directories sites/default/files or sites/default/files/translations exist but are not executable, then installation does not work.

So... I'm wondering how can it work on a windows machine without being executable?

Attached is what I did on the command line to create the test conditions.

"needs review" just to see what the testbot says without the executable checks.

YesCT’s picture

re #3

Not sure if new users understand that they need to create both without us telling them to do this.

We do not tell them they need to do that, because most people do not. It tries to create them automatically. The message that says to create them only gets shown if the system was not able to do it automatically. We hope it will happen automatically for most people.

YesCT’s picture

oh, forgot these, with the patch:
with a files directory that is not executable:

with a files dir that is executable (so I could create the translations dir!) but a translations dir that is not executable... the translation file cannot be downloaded.

Warning: file_put_contents(sites/default/files/translations/drupal-7.0.af.po) [function.file-put-contents]: failed to open stream: Permission denied in install_retrieve_file() (line 1466 of core/includes/install.core.inc).

The Afrikaans translation could not be downloaded.
The Afrikaans translation file could not be downloaded. Choose a different language or select English and translate your website later.


So... in order to get this to work on windows (really?) we need to take out the check if translations dir is executable. But if on other systems the translations dir is not exectuable, then the error message they get is misleading, it says to try another language, not to make the dir executable.

YesCT’s picture

Title:Can't install on windows due to folder permissions.» Can't install on windows due to folder permissions (executable check not needed)
Issue tags:-needs initial patch
YesCT’s picture

Gábor Hojtsy’s picture

YesCT’s picture

Title:Can't install on windows due to folder permissions (executable check not needed)» Can't install on some systems (like windows) due to folder permissions (executable check not needed)

We decided to go with this solution.

So a review is needed here.

YesCT’s picture

Gábor Hojtsy’s picture

If this breaks on a Mac, then how does the file directory break (or not break?) under similar conditions. Executable checks are not done on other directories.

YesCT’s picture

If you are wondering why it's broken on a mac in #7 [edit: screenshot 2 the first part is similarly contrived], that only happened because I was testing to see what would happen in the case of a non executable directory. So I had to mkdir the dirs and then chmod a-x translations to simulate that condition. Almost always, I think, on *nix systems the directory will be made with executable permission. So my contrived test situation won't happen. That assumption is supported by the fact that people have been going on using the files dir which is created in the same way as the translations dir.

Sutharsan’s picture

I like to see this tested on a windows system. But other than that, the patch should be RTBC. I'll ask for tests in the g.d.o issue.

YesCT’s picture

herom’s picture

checked on windows. it works fine.

Without the patch, fails with "The translations directory is not executable." error.
Using the patch, there are no errors, and correctly downloads the translations into sites/default/files/translations.

YesCT’s picture

YesCT’s picture

Based on #15 and #17 if it comes back from the testbot ok, this should be RTBC.

aspilicious’s picture

Status:Needs review» Reviewed & tested by the community

Let's get this in...

webchick’s picture

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary:View changes

edited code