< 172023-01-18⋎19 >

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

< 172023-01-18⋏19 >