Situation
When open the system the Calendar page is not loading. Instead it gives me an Error posted below. The same Error happens when I try to go to Documents. Everything else is working OK. The openemr folder and subfolders are root:root with 755 permissions. The Smarty.class.php I changed to local user:local user with 666 permissions. The problem persists.
**OpenEMR Version
I’m using OpenEMR version 7 (1)
Browser:
I’m using: Chrome
Operating System
I’m using: Ubuntu 20.04 LTE
Logs
Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All
Fatal error : Smarty error: unable to write to $compile_dir ‘/home/admin/domains/drhinov.com/public_html/openemr/sites/default/documents/smarty/main’. Be sure $compile_dir is writable by the web server user. in /home/admin/domains/drhinov.com/public_html/openemr/vendor/smarty/smarty/libs/Smarty.class.php on line 1099
Thank you. I changed it as recommended and now the owner is www-data and the group is root. It does not change the error. Still the same problem persists.
I did. The message is:
Error: folder ‘/home/admin/domains/drhinov.com/public_html/openemr/sites/default/documents/smarty/main’ not writeable!
Smarty Cache has been cleared
if I rename smarty directory the OpenEmr log in page is not opening. If I try to run a setup.php to recreate the directory it is not responding as well. I checked the smarty and main directory permissions as well as the files in the main directory permissions and they all are www-data:root for owner/group
When I rename the smarty directory back everything is back to the previous state.
Was this working? Is new install or production? You really should not be running openemr in root but instead www-data/www-date or even www-data/root maybe depending how www-data is config’ed.
Doubtful openemr has root permissions as it is an app.
I have been restoring the system after a disaster. I have a back up zip files and back up sql files from the old system.
I have been trying to work on it every possible way. This particular tryout is a new install on OpenEmr 7.0 followed by import of the sql database with replacement of the sites/default/document folder from the zip backup file.
I am sure all this messes up permissions.
My backups are from version 6.1.0 and this could also contribute to my problems. I tried to update the database with sql_update.php with improves the situation some.
Current status is the best I came up with.
Did you successfully do @stephenwaite suggestion from openemr root? What are the current directory owner/groups i.e from openemr root directory ls -la ?