Yesterday I’ve installed Dolibarr on a shared hosting. Everything seems to work OK, but I can not upload files through Documents Module (manual folders), and I can not upload the company logo (it gives me the following error: “Error, failed to file the record.”)
I created the folder “documents” as specified in the installation instructions and has all the permissions (777), both for the FTP user and for Others.
What I noticed is that the owner of the folders created in the install process within this, it is the user “apache”. I´ll
guess have the same problem when I try to generate a PDF because the system gives to me the following error, when I ask to preview a document model "TCPDF ERROR: Unable to create output file: / var / www / vhosts / mydomain.com / httpdocs / dolibarr / documents / Propal / SPECIMEN.pdf "
Any idea to solve this problem? Thank you very much!
I have the same problem. Does anyone know a solution? I guess the user that creates the folder should not be the user apache but a user who has more rights on the server…
All actions done by a PHP application like dolibarr are executed with “apache” user. So permission on directories must be granted to apache. If you allow write for “everybody” this should works also because apache is inside “everybody”. However, you must be sure that:
* permission are on directory but also on parent directories.
* you don’t have a php option like open_basedir that restrict permission by php to only few directories
* that your OS does not contains a security system that need also to be setup. This is the case for example with fedora that include SELinux. Setup such a system need to be an admin user and know how SELinux works. No way to solve this with dolibarr itself.
For this 3 case, only the web hosting provided and admin user can give you an answer and make change required i’m afraid.