Unable to load Calendar and Documents

that’s odd, can you do a service apache2 restart?

True but if the main directories and the subdirectories owners and groups are not set up correctly for write privileges then all bets are off.
If memory serves(I haven’t done linux set ups in couple years) even if the smarty folder has write permissions but documents doesn’t allow write then no write to smarty folders. The directory -x or sticky bit should be set for documents and subdirectories down to the smarty folder.
Someone correct me if I’m wrong!

I suggest to try www-data www-data recursive at openemr root. openemr should not have root privileges

I went on and changed the permissions. I changed the permissions for others for the main subdirectory to read and write and changed the same permissions for all the files in the directory. Everything works now!

glad it’s working however insecure it may be :sweat_smile:

sounds like somebody else is driving the apache2 :bus:

Well at least I am getting somewhere. How do I make is secure and working?
I am on Directadmin

oh, I thought this was self hosted on ubuntu?

Sorry. I am on Directadmin and did not mentioned it. I am very thankful for your help!

The OS is Ubuntu but I am using the Directadmin console and this is why the root directory is as such

the user name for the webserver might be just plain old apache then

https://www.directadmin.com/features.php?id=923

So if I chown -R apache:www-data for the openemr directory it will be working and sequre?

test that out please and can then give you instructions on how to secure the directories
so remove the other write perms and change owner recursively to apache from the openemr webroot

sudo chown -R apache:root /home/admin/domains/drhinov.com/public_html/openemr

It is working with the change

first restrict all dirs

find /home/admin/domains/drhinov.com/public_html/openemr -type d -print0 | xargs -0 chmod 500

then restrict all files

find /home/admin/domains/drhinov.com/public_html/openemr -type f -print0 | xargs -0 chmod 400

then reopen writeable directories

find /home/admin/domains/drhinov.com/public_html/openemr/sites/default/documents -type d -print0 | xargs -0 chmod 700

Thank you so much!
I appreciate your help!

1 Like

also see this important piece too please, https://www.open-emr.org/wiki/images/1/11/Setup6-6.png

I would like to thank you for all your time and advise. I followed the series of commands, but unfortunately after I changed everything the system became unaccusable so I had to change everything back to chmod 755 in order to access it again.
If I understand the commands correctly you want all the folders to be readable and executable only by the owner which in this case is apache. You want also the documents folder to give the owner all the permissions. Sound logical but why do I loose ability to access the system after this? I feel this is probably Directadmin interference.
Also the recommended configuration changes for the apache - do I do it on the recommended apache directory and cofig file since I use the Directadmin?
Again thank you very much for your time!

Recm you read up on users owner and groups and how they work together.

If you installed openemr using a root account say admin and the account is not in the owner group then this is where your issue may be.

1 Like

what do you see when you run

ps aux | grep apache

apache 1677924 0.0 0.1 3122392 12444 ? Sl 00:11 0:16 /usr/sbin/httpd -DFOREGROUND
apache 1678211 0.0 0.1 3253676 15244 ? Sl 00:11 0:17 /usr/sbin/httpd -DFOREGROUND
vhinov 2119084 0.0 0.0 6428 660 pts/0 S+ 10:39 0:00 grep --color=auto apache