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.
Comment | File | Size | Author |
---|---|---|---|
#7 | executable-s01-files-2013-01-11_1125.png | 69.73 KB | YesCT |
#7 | exectable-s02-translations-2013-01-11_1127.png | 108.8 KB | YesCT |
#5 | executablehistory.txt | 1.36 KB | YesCT |
#5 | drupal-translations_dir_executable-1885510-5.patch | 2.29 KB | YesCT |
#3 | Requirements problem | Drupal.jpg | 30.7 KB | steinmb |
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedLets 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.
Comment #2
YesCT CreditAttribution: YesCT commentedRelated (just got this feature in) #1848490: Import translations automatically during installation
Comment #3
steinmb CreditAttribution: steinmb commentedComing 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.
Comment #4
Sutharsan CreditAttribution: Sutharsan commentedPossible duplicate at #1886164: Install in different language requirement warns translations dir not executable, when the dir is executable on some systems
Comment #5
YesCT CreditAttribution: YesCT commentedhere 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.
Comment #6
YesCT CreditAttribution: YesCT commentedre #3
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.
Comment #7
YesCT CreditAttribution: YesCT commentedoh, 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.
and
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.
Comment #8
YesCT CreditAttribution: YesCT commentedComment #9
YesCT CreditAttribution: YesCT commentedPlease try the patch in #1886164-11: Install in different language requirement warns translations dir not executable, when the dir is executable on some systems
Comment #10
Gábor HojtsyEither this one or #1886164: Install in different language requirement warns translations dir not executable, when the dir is executable on some systems should be marked duplicate no?
Comment #11
YesCT CreditAttribution: YesCT commentedWe decided to go with this solution.
So a review is needed here.
Comment #12
YesCT CreditAttribution: YesCT commented#5: drupal-translations_dir_executable-1885510-5.patch queued for re-testing.
Comment #13
Gábor HojtsyIf 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.
Comment #14
YesCT CreditAttribution: YesCT commentedIf you are wondering why it's broken on a mac in #7 [edit:
screenshot 2the 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.Comment #15
Sutharsan CreditAttribution: Sutharsan commentedI 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.
Comment #16
YesCT CreditAttribution: YesCT commentedrelated #944582: ./sites/default/files directory permission check is incorrect during install AND status report (affects Docker on Windows)
Comment #17
herom CreditAttribution: herom commentedchecked 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.
Comment #18
YesCT CreditAttribution: YesCT commented#5: drupal-translations_dir_executable-1885510-5.patch queued for re-testing.
Comment #19
YesCT CreditAttribution: YesCT commentedBased on #15 and #17 if it comes back from the testbot ok, this should be RTBC.
Comment #20
aspilicious CreditAttribution: aspilicious commentedLet's get this in...
Comment #21
webchickCommitted and pushed to 8.x. Thanks!
Comment #22.0
(not verified) CreditAttribution: commentededited code