Hi,
I’m new to Drupal and FarmOS.
Recently I installed FarmOS with CloudPanel (Nginx based) and everything seems to be working fine. However, when I try to upload a file, it always gives me this error.
" The file could not be uploaded because the destination “private://farm/asset/2023-01 " is invalid.”
I installed tarball from GitHub, and I followed other forum issues and did no help.
Here are some tech data, so it might help to pinpoint the issue.
Hosting Directory: /home/farm-os/htdocs/sites-name/web
There was no private/files folder in sites/default, so I created it manually
Later
I checked the configuration files and added the following settings.
/**
* Private file path:
*
* A local file system path where private files will be stored. This directory
* must be absolute, outside of the Drupal installation directory and not
* accessible over the web.
*
* Note: Caches need to be cleared when this value is changed to make the
* private:// stream wrapper available to the system.
*
* See https://www.drupal.org/documentation/modules/file for more information
* about securing private files.
*/
$settings['file_private_path'] = 'sites/default/private/files';
/**
I found the same issue and performed Nginx and server reboot, and no luck.
Requesting assistance.
I tried the absolute path as well, but that didn’t help and saw other members using such a path and mentioned that that worked for them, and that’s why I used it.
Directory got full access by Nginx and have 755 permission
It can be (that’s what I do personally), but I think it’s a bit simpler (from a new user documentation perspective) to let Drupal create the settings.php file during installation and then add this line + cache clear after. Otherwise the instructions involve a lot more manual editing of settings.php, which Drupal’s install.php handles with a nice UI.