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.
Hello
I’m having similar issues setting up my private file system path. I have changed my file path on settings.php but still no luck. Any suggestions or help.
The folder is set for private and group but no world. If you don’t mind can you check it out and see what I’m doing wrong. I have been working on it all day and still not working for me.
that is apache server DocumentRoot problem in shared hosting. Because, in shared hosting we can’t change main domain DocumentRoot it’s pointing to public_html folder.So, we adjusted in .htaccess file in public_html folder pointing to /farmOS/web/. tank you. Already described in this topic https://farmos.discourse.group/t/install-and-update-farmos-on-shared-hosting/2215
here, you should set private file path during installation time. (just remove # before $settings['file_private_path'] = 'sites/default/private/files this line).
this is not editable via cpanel filemanager. so, i just edited using cpanel terminal(because drupal generated private: folder is empty). now its worked. check here. thank you.