| 13:18 | mstenta[m] | symbioquine: heads up... I think we'll have some new folks on the dev call today who are interested in the learning more about the WFS module + GIS integration |
| 13:18 | symbioquine[m] | Very cool! |
| 13:18 | mstenta[m] | Aislinn from Rothamsted and Jonathan from PearGIS |
| 13:18 | symbioquine[m] | Dev call might be tomorrow though... |
| 13:18 | mstenta[m] | ah right hahaha |
| 13:19 | lordeddi[m] | hi, i went through that private folders and settings.php story |
| 13:19 | lordeddi[m] | not sure if there will be time on the dev-call. |
| 13:20 | mstenta[m] | oh lordeddi fyi we had another one: farmos.discourse.group/t/the-file-could- |
| 13:20 | mstenta[m] | confirmed that clearing the cache made the differene |
| 13:20 | lordeddi[m] | basically: |
| 13:20 | lordeddi[m] | - if one unpacks or spins up docker and loads the page > settings.php is created and editable |
| 13:20 | lordeddi[m] | if the private path is set and after that the web-install is done, all works, the private folder is created right after setting the DB configuration in web-installer |
| 13:20 | mstenta[m] | s/differene/difference/ |
| 13:21 | lordeddi[m] | - if the web-installer is done and after that the settings.php is changes > the caches are already created and the error occurs |
| 13:21 | lordeddi[m] | the save button in admin/config/media/file-system does not work |
| 13:21 | lordeddi[m] | the clear caches button in admin/config/development/performance does work |
| 13:22 | mstenta[m] | great! |
| 13:22 | mstenta[m] | thanks for testing that all out! |
| 13:22 | mstenta[m] | so it sounds like we just need to add "clear the cache" to the instructions |
| 13:22 | lordeddi[m] | but only after the admin creates the web/sites/default/private folder (the "files" subfolder is created automatically) |
| 13:22 | lordeddi[m] | mstenta[m]: 🙀 no! the folder needs to be created too |
| 13:23 | lordeddi[m] | i think it would be best to advise users to FIRST change the settings.php and THEN running through the web-installer |
| 13:23 | lordeddi[m] | if that makes sense, and is explicable to users |
| 13:23 | mstenta[m] | well... the problem is that the web-installer CREATES settings.php |
| 13:23 | lordeddi[m] | (since drupal will create the folder with correct user and permissions) |
| 13:23 | lordeddi[m] | :) |
| 13:23 | mstenta[m] | that's the reason why we don't say to do that first |
| 13:24 | lordeddi[m] | ah okay, i wasnt clear |
| 13:24 | lordeddi[m] | 1. unpack or docker-compose up |
| 13:24 | lordeddi[m] | 2. (settings is created) update settings |
| 13:24 | lordeddi[m] | 3. perform web-installer |
| 13:24 | symbioquine[m] | It would be nice if Drush just had the option to specify a folder location as part of the site-install command... |
| 13:24 | mstenta[m] | see this comment: farmos.discourse.group/t/the-file-could- |
| 13:25 | lordeddi[m] | * ah okay, i wasnt clear |
| 13:25 | lordeddi[m] | 1. unpack or docker-compose up |
| 13:25 | lordeddi[m] | 2. load page (settings is created) update settings |
| 13:25 | lordeddi[m] | 3. perform web-installer |
| 13:25 | symbioquine[m] | www.drupal.org/project/drush/issues/1195 |
| 13:25 | lordeddi[m] | * ah okay, i wasnt clear... (full message at <libera.ems.host/_matrix/media/v3/downloa>) |
| 13:25 | mstenta[m] | so... maybe we just need to add steps to the install guide: |
| 13:25 | mstenta[m] | - create private files dir w/ proper perms |
| 13:25 | mstenta[m] | - add line to settings.php |
| 13:25 | mstenta[m] | - clear cache |
| 13:26 | lordeddi[m] | yeah, that would work |
| 13:26 | lordeddi[m] | also, the path in the docs is .....default/private/files |
| 13:26 | lordeddi[m] | but the files sub-folder is not really needed, maybe this is for clarity? |
| 13:26 | lordeddi[m] | could be default/private |
| 13:27 | lordeddi[m] | and then all files would be stored under private |
| 13:27 | mstenta[m] | > ah okay, i wasnt clear... (full message at <libera.ems.host/_matrix/media/v3/downloa>) |
| 13:27 | lordeddi[m] | agreed |
| 13:28 | lordeddi[m] | also, when visiting the media/file-system page after adding that settings line, the button won't work since : |
| 13:28 | mstenta[m] | > also, the path in the docs is .....default/private/files |
| 13:28 | mstenta[m] | > but the files sub-folder is not really needed, maybe this is for clarity? |
| 13:28 | mstenta[m] | hmm i think it needs to be `private/files`... but i don't have a good reason to back that up... it's been drupal convention for as long as i can remember, so there might be a good reason |
| 13:29 | * | uploaded an image: (69KiB) < libera.ems.host/_matrix/media/v3/downloa > |
| 13:29 | mstenta[m] | hmm or maybe that's outdated info on my part! |
| 13:29 | mstenta[m] | www.drupal.org/docs/8/core/modules/file/ |
| 13:29 | lordeddi[m] | that list does not show the private option, and clicking the public option makes so that all files would be stored under .../default/files (not okay) |
| 13:29 | lordeddi[m] | * (not okay/adviseable) |
| 13:30 | mstenta[m] | hmm yea something's wrong there... it should show the private option |
| 13:30 | lordeddi[m] | > <@mstenta:matrix.org> > also, the path in the docs is .....default/private/files... (full message at <libera.ems.host/_matrix/media/v3/downloa>) |
| 13:30 | mstenta[m] | no i think you're right lordeddi - it can just be `private` |
| 13:30 | mstenta[m] | that's what these docs have: www.drupal.org/docs/8/core/modules/file/ |
| 13:30 | mstenta[m] | so maybe i'm just outdated :-) |
| 13:30 | lordeddi[m] | mstenta[m]: it does not since it is at that moment not yet aware of that folder or something, or because the folder is not yet created (i did not dare digging deeper 🪱) |
| 13:31 | mstenta[m] | ok... but if you create it and add the line to settings.php and clear cache, does the form work properly? |
| 13:31 | mstenta[m] | i think ideally we wouldn't need to tell users to go to that form |
| 13:32 | lordeddi[m] | yes |
| 13:32 | mstenta[m] | * create it (the folder) and add |
| 13:32 | lordeddi[m] | mstenta[m]: yes to this |
| 13:32 | lordeddi[m] | mstenta[m]: the file-systems one? |
| 13:32 | lordeddi[m] | i would agree to that |
| 13:32 | mstenta[m] | yea, it shouldn't be necessary to use that form |
| 13:33 | lordeddi[m] | exact/agree |
| 13:33 | mstenta[m] | we were playing around with saving that form during debugging, just to see if it helped |
| 13:33 | lordeddi[m] | i never needed that file-systems form when debugging/testing this private stuffs |
| 13:33 | mstenta[m] | > so... maybe we just need to add steps to the install guide:... (full message at <libera.ems.host/_matrix/media/v3/downloa>) |
| 13:34 | lordeddi[m] | it only confused me (with that list and all) 😆 |
| 13:35 | lordeddi[m] | i'll test it one more time, now i have it all ready to go, so we don't mess it up :D |
| 13:35 | mstenta[m] | great thanks again lordeddi! |
| 13:36 | lordeddi[m] | i guess enabling many modules during web-install won't affect the resul;t |
| 13:36 | lordeddi[m] | s/resul;t/result?/ |
| 13:37 | mstenta[m] | shouldn't |
| 13:37 | mstenta[m] | also worth noting: using drush site-install would have the same end-result |
| 13:37 | mstenta[m] | (as the web-installer) |
| 13:37 | mstenta[m] | (and the steps to enable private files afterwards would be the same I think) |
| 13:38 | lordeddi[m] | i think so too |
| 13:38 | lordeddi[m] | that drush command creates the settings.php |
| 13:38 | mstenta[m] | (i only mention that because it might make testing easier/faster... it's possible to use drush site-install and tell it to only install base modules - the same as unchecking all of them during web-install) |
| 13:38 | lordeddi[m] | when loading an installed/configured farmos instance webpage those caches are created and stuffs goes wrong |
| 13:39 | lordeddi[m] | if you change the private afterwards, like we all seem to be doing :D |
| 13:42 | lordeddi[m] | > <@mstenta:matrix.org> so... maybe we just need to add steps to the install guide:... (full message at <libera.ems.host/_matrix/media/v3/downloa>) |
| 13:42 | lordeddi[m] | after that upload works |
| 13:44 | lordeddi[m] | also: make sure to add it to both |
| 13:44 | lordeddi[m] | - farmos.org/development/environment/ |
| 13:44 | lordeddi[m] | - farmos.org/hosting/install |
| 13:49 | lordeddi[m] | glad to have helped 😊 |
| 13:50 | mstenta[m] | lordeddi: do you have time/interest in making a PR? |
| 13:50 | mstenta[m] | no pressure - I'm happy to as well, but wanted to give you the opportunity for commit credit :-) |
| 13:50 | mstenta[m] | thanks for all the help investigating!! |
| 13:52 | lordeddi[m] | yeah, sure i can try, never done a pr before (on my jobs, i usually set up new gits, and never get to PR's before another team takes over or the startup goes bust :D) |
| 13:52 | lordeddi[m] | i would need to read some docs and that might take time 🙄 |
| 13:53 | mstenta[m] | No worries! I'm happy to do it :-) |
| 13:54 | lordeddi[m] | maybe you can give me some pointers, which repo and what branch ? |
| 13:54 | lordeddi[m] | #readingTheDocs |
| 13:54 | lordeddi[m] | :D |
| 13:55 | mstenta[m] | Sure! |
| 13:56 | lordeddi[m] | and i guess i need to fork the project too into my github account? |
| 13:56 | mstenta[m] | In your local dev env, the farmOS repo is in web/profiles/farm |
| 13:56 | lordeddi[m] | mstenta[m]: if you have time, ay, mstenta |
| 13:57 | mstenta[m] | > and i guess i need to fork the project too into my github account? |
| 13:57 | mstenta[m] | Yep! The farmOS repo |
| 13:57 | mstenta[m] | cd to the farm dir and run these commands: |
| 13:57 | mstenta[m] | git checkout -b 2.x-private-file-docs |
| 13:58 | mstenta[m] | That will create a new branch for your changes |
| 13:58 | mstenta[m] | git remote add lordeddi [repo] |
| 13:58 | mstenta[m] | Replace [repo] with your fork URL, which you can get from Github |
| 13:59 | mstenta[m] | I think it will be git@github.com:lordeddi/farmOS.git |
| 13:59 | mstenta[m] | Then you can make commits, and push the branch to your fork |
| 14:00 | mstenta[m] | git push lordeddi 2.x-private-file-docs |
| 14:04 | mstenta[m] | after that, when you go to your fork in github, you'll see a little prompt for opening a PR |
| 14:09 | lordeddi[m] | thanks! working through it |
| 14:09 | lordeddi[m] | got a fork of farmos (only forked 2.x branch though, hope that's okay) |
| 14:11 | mstenta[m] | yup that's correct! |
| 14:12 | mstenta[m] | > In your local dev env, the farmOS repo is in web/profiles/farm |
| 14:12 | mstenta[m] | you have a choice... you can either do it in the directory in your local dev environment... or if you would prefer you can just `git clone` the farmOS repo to a new directory somewhere... |
| 14:12 | mstenta[m] | since this is just doc changes, you don't really need it to be in your dev environment for testing code |
| 14:12 | mstenta[m] | (but if you ever want to do that in the future, you can) |
| 14:28 | lordeddi[m] | the user should be www-data |
| 14:28 | lordeddi[m] | and the folder permissions should be 755 ? |
| 14:28 | lordeddi[m] | (of that private folder) |
| 14:29 | symbioquine[m] | lordeddi[m]: Probably not... |
| 14:29 | symbioquine[m] | Seems too open |
| 14:29 | lordeddi[m] | oops true |
| 14:31 | symbioquine[m] | www.drupal.org/node/244924 |
| 14:32 | mstenta[m] | > the user should be `www-data` |
| 14:32 | mstenta[m] | this is true for Apache... maybe not for others (Nginx?) |
| 14:32 | symbioquine[m] | > Hosted sites "files" directory: rwxrwx--- |
| 14:32 | symbioquine[m] | > <@mstenta:matrix.org> > the user should be `www-data` |
| 14:32 | symbioquine[m] | > |
| 14:32 | symbioquine[m] | > this is true for Apache... maybe not for others (Nginx?) |
| 14:32 | symbioquine[m] | And different OS'/distros may use different names/ids |
| 14:33 | mstenta[m] | so maybe something like: "If you are using Apache (or the farmOS Docker image), then the web server user/group is probably `www-data`" |
| 14:33 | mstenta[m] | * so maybe something like: "If you are using Apache (like in the farmOS Docker image), then the web server user/group is probably `www-data`" |
| 14:42 | lordeddi[m] | so if i understand this, for the docker image |
| 14:42 | lordeddi[m] | `drwxr-x--- 3 www-data www-data 4096 Jan 18 13:41 private` |
| 14:42 | lordeddi[m] | which is permission 740 |
| 14:43 | lordeddi[m] | and IIRC nginx,by default, runs as www-data |
| 14:43 | lordeddi[m] | (last time i checked) |
| 15:00 | lordeddi[m] | * <del>(last time i checked)</del> |
| 15:01 | lordeddi[m] | the user which nginx runs under is configured under /etc/nginx/nginx.conf and on a fairly new and default setup it states user www-data; |
| 15:12 | lordeddi[m] | <lordeddi[m]> "which is permission 740" <- hm.... so if the folder belongs to the webserver user `www-data` permissions `700` would suffice, since the webserver user is the only user which needs rwx to that folder (group can be omitted) |
| 15:12 | lordeddi[m] | `770` would also work as symbioquine posted (which i missed) |
| 15:16 | * | farmBOT has joined |
| 15:28 | lordeddi[m] | sorry for the many messages... (full message at <libera.ems.host/_matrix/media/v3/downloa>) |
| 16:46 | mstenta[m] | sorry lordeddi I have a bunch of appointments and meetings today so i haven't been able to keep up |
| 17:22 | lordeddi[m] | Hey dont worry. Whenever there's time. Hope i did not come over as a pushy person. I only had a small window and was trying to cram everything in there 😄 |
| 17:33 | mstenta[m] | all good! |
| 17:46 | mstenta[m] | lordeddi: yea I think that looks pretty good! the only part that might be a bit ambiguous is the last two lines... it should probably explicitly say to set the user/group of the directory to `www-data`, because that's what `770` assumes. |
| 17:47 | mstenta[m] | (very minor nitpick) :-) |
| 17:49 | mstenta[m] | Maybe like:... (full message at <libera.ems.host/_matrix/media/v3/downloa>) |
| 17:49 | mstenta[m] | not much different from what you had I suppose :-) |
| 17:49 | mstenta[m] | * Docker image (running Apache), this |
| 20:04 | lordeddi[m] | Thanks! |
| 20:56 | evered[m] | Thank you! |
| 20:56 | * | gets in on the thanking part :) |