Unable to Access or upload any documents after upgrade from 5.0.1(7) to 5.0.2 (5)

After Linux upgrade unable to access documents, neither upload nor view. I get this ;
The requested document is not present at the expected location on the filesystem or there are not sufficient permissions to access it. /var/www/openemr/sites/default/documents.

Compared old 5.0.1 to 5.0.2 and noted that file attributes of document file is set to openemr:openemr while files within documents are now set to root:root instead of www-data:www-data as in the older version.
Everything else seems to be working well.

Correction: Batch Payment Entry page was also not functioning correctly.

OK. There can be a few causes to this. I would try the following:

  1. Go to your /var/www/[openemr directory] /sites/default/ documents via your command terminal and see if you can access via that method.

  2. you might have to give access to www-data:www-data to your document folder.

Hi Daniel,
My instance is running on a Ubuntu 18.04 LTS server guest /windows 10 host. I used webmin to evaluate the documents file and changed the attributes of all the files from root:root to www-data:www-data and that didn’t resolve the issue. I also tried changing the permissions from 755 to 777 and that didn’t help either. I can see that the files are still present when I dive into the individual files for the patients. I’m not really sure what you mean though by 1 and 2 above.
Thank you for helping,
Henry

A newbie ignorant thought; Is it possible that the problem occurred because I initiated the copy commands from root instead of sudo? Should I try changing all the attributes within the documents file to openemr:openemr?

Sorry wrote attributes when I should have meant ownership. Nope. Tried changing the ownership of all the files within documents to openemr:openemr as well as www-data:www-data recursively and still no go. Fresh out of any ideas!

What file should I go to to see the command that initiates a document to be obtained?

Can you post a screenshot of the error you get when you try to access a document? I think I have an idea of what the problem is. Just be careful not to post any PHI. The file tree on the left might contain a patient name in the filenames, so create a test patient and upload any document of your choice.

Here is what I would do. I would create a test patient. Upload a document using 502. Then try to access it. I

For example, when I try to access a document I get the following error:

If you can show me this screen, it will help.

image

image

Hi Daniel
The first uploaded image is what I get when I try to upload a document.
The second image is what happens when I try to download a previous (before the update) document.
This is a fake patient previously entered to experiment with.

Thank you,
Henry

For the upload, you need to make sure you selected a file and its name is populated in the following field:

Also, you might want to try the drag-and-drop feature that lets you drop files into the “Drop” area. That worked for me.

For viewing the files, it looks like OpenEMR is checking the wrong directory. Did you change the URL to your OpenEMR? Fro the screenshot I can’t see the web address in your browser.

image
image

Hi Daniel,
The URL has not changed.
The upper image has the pdf document dropped in.
The lower image shows the result when trying to upload.

Thank you,
Henry

Hmmm… I’m happy to look at it using AnyDesk so I can see what’s going on. I’ll PM you my contact info.

Hi Daniel,

I’m going to try to update again, as soon as I have a few days free. Will try sudo instead of root to see if that makes a difference in how the files are accessed. If that doesn’t work, I will be giving you a call.

Thank you for helping,

Henry