I tried importing a KML file on a self hosted server and got the following error message
Error message
The file could not be uploaded because the destination " private://kml " is invalid.
Any ideas how one gets around this?
I tried importing a KML file on a self hosted server and got the following error message
The file could not be uploaded because the destination " private://kml " is invalid.
Any ideas how one gets around this?
It seems this is also true for image file uploads as well. the procedure errors out because “private://*” is invalid. Seems there’s a directory either missing or with incorrect permissions set but i can’t locate it in the file hierarchy or know where to create it if need be…
I believe you need to create a private folder then use that as the path. You may need to reference it in settings.php too.
$settings[‘file_private_path’] =
Named "private’?
@Farmer-Ed is correct - @debo you need to configure your private filesystem. This is described in the “Installing farmOS” docs here: Installing farmOS | farmOS
Here is a link to the more general Drupal documentation for this as well, in case it’s helpful for your environment: File system settings | Drupal.org
(Note that farmOS is built on Drupal 9, but most docs for Drupal 8 also apply.)
so Ive tried to create the specified folder (private/files) in the /farmOS/web/sites/default directory to no avail. THe CHMOD is 555 and it’s not accepting changes to te permission structure. However i notice a folder /web/private: that contains the correct folder hierarchy for the /files/assets and /kml pathways
I’ve followed every directive shared and outlined in the Drupal documentation and yet no joy. I keep getting the same error message despite following the instructions as detailed. There is a folder at the /web directory level named private: even when i delete this file it reappears with the correct sub directory folders in place.
I have tried placing the private directory in numerous locations - in the default folder, outside the root directory as specified - yet no joy.Seems the system is intent on saving data to the web/private: folder but for some reason it considers the destination invalid and keeps throwing a fit. I’ve even gone as far as changing the permissions on the both the parent directory and the folder itself to no avail.
I’m a farmer not a coder and at this point I’m about to jettison this and just go back to pen and paper, i’ve already lost 4 days i should be tending fields to this kerfaffle
@debo Sorry to hear you’re having trouble. Can you describe your setup in more detail? Is farmOS installed on Linux? Mac? Windows? Are you using Docker? Or running farmOS on Apache yourself (via the packaged tarball)? Can I assume you used the official installation instructions? Installing farmOS | farmOS
The more you can tell us the better we’ll be able to help.
Based on the information above, I’m a bit a stumped. I’ve never experienced the /web/private
folder you’re describing, but it’s still a bit hard for me to picture what you’re seeing. Again knowing if you are on Linux/Windows/Docker would help a lot. Feel free to share screenshots/commands/output etc too.
Since farmOS is built on Drupal this means a) there are a LOT of different ways to install it, so it supports many different environments (great!), and also b) this means there is a lot more room for complexity and issues to arise in different contexts, however. This is the reason we provide a Docker image and primarily recommend that for self-hosting, since it encapsulates a lot of the necessary dependencies and configuration so it “just works” in most places. There are other layers, and not everyone can run Docker, of course. We try to make self-hosting as easy as possible, but there are still some inherent complexities to it.
I’ve changed the category of this topic from “Using farmOS” to “Hosting farmOS”. Hopefully we can get to the bottom of your issue…
I’m using Siteground as the the hosting provider. I used the packaged tarball (which installed the package in a most horrible URL ever mysite//farmOS-2.0.0-beta1.tar/farmOS/web/…)
I have no idea how Docker works or how to use ir - or Composer - the more I read the more confused it became)
PHP 7.4.27
You might have luck contacting Siteground and telling them you want to install a Drupal 9 website. Maybe they have resources to help their customers do that.
Of course, you’ll excuse me if I suggest using Farmier for hosting? If you don’t want to deal with hosting/updating/backups/etc and just want to use farmOS it takes care of all that for you.
Depends on what you need though… if you’re hoping to do some tinkering/development then self-hosting is the way to go. Farmier is more of a “farmOS-as-a-service” - handles the lower level hosting aspects, but you don’t get direct server access.
their environment is at 9.x already - i already was getting annoying prompts urging me to upgrade from my version of drupal 9 to the latest incarnation. Farmier isn’t an option for us, I’m all the way in Africa and the internet breaks frequently
Well the fact that you have everything working except the private file uploads is great! You might want to reach out to Siteground about that issue specifically, and ask about file permissions…
I’ve even gone as far as changing the permissions on the both the parent directory and the folder itself to no avail.
Did you do this via a web UI that they provide (eg: CPanel)? Or via a command line terminal? Exactly what directories did you change the permissions of (this could have security concerns)?
Were you able to create a sites/default/private
directory? Or not?
Can you please paste the exact lines that you added to your settings.php
file?
The more specific details the better.
i am tired - i ended up deleting the whole setup
Downloaded beta 2
Installed without a hitch
Glad to hear persistence paid off @debo !
I have the same issue. I can’t upload images. I use docker with OS Windows 10. I also updated FarmOS to Beta2, but no luck with uploading images.
In settings.php I set $settings[‘file_private_path’] = ‘/opt/drupal/web/sites/default/private/files’;
I also tried other settings, but no luck. It seems to me that the settings.php is ignored.
Folder permissions issue?
Or something in .htaccess file to block?
Is the file not uploading or just not being served by Apache when you try to view it?
It seems I found a bug: Uploading pictures works in “Assets - seed”, but not in “Taxonomy - plant types”.
Also in “Taxonomy - plant types”: There are useful fields defined like “Days to transplant” or “Days to maturity”, but I don’t see them anywhere else.
I can’t upload images. I use docker with OS Windows 10.
@Farmy are you using WSL2 to run Docker? Someone else reported that using WSL2 was the only way they were able to get bind-mounted Docker volumes (eg: for file uploads) to work.
In settings.php I set $settings[‘file_private_path’] = ‘/opt/drupal/web/sites/default/private/files’;
This is the correct path for a Docker-based install.
It seems to me that the settings.php is ignored.
Go to [your-farmOS-domain]/admin/config/media/file-system
. Do you see /opt/drupal/web/sites/default/private/files
under “Private file system path”? If so, then your settings.php
is working, and therefore something else must be wrong.
It seems I found a bug: Uploading pictures works in “Assets - seed”, but not in “Taxonomy - plant types”.
Hmm. So that would suggest that your private filesystem is working correctly? If you’re able to upload ANYTHING ANYWHERE, then it’s probably working. I’m not sure why Plant Type uploads aren’t… that may indeed be a bug.
There are useful fields defined like “Days to transplant” or “Days to maturity”, but I don’t see them anywhere else.
These were fields added in farmOS v1 that never really got used anywhere, but we kept them in v2 in case anyone put data in there. They may get used by the Crop Planning module in the future…