Going to 'Lists' generates 500 Error after update to 5.0.1

Hello,
I just updated this instance from 5.0.0 to 5.0.1 - After installing the update, and the patch, I was going through and testing all the menu items to ensure they were working and found that ‘Lists’ will generate a 500 Error. I went to the error logs and this is what came up:

SoftException in Application.cpp:261: File “/home/site/public_html/openemr/interface/super/edit_list.php” is writeable by group, referer: http:/site/openemr/interface/main/tabs/main.php

Thanks
Robb

It sounds like OE’s internal security doesn’t like how the patch was applied – it’s not happy that other users could edit those patched files. Can you perform ls -al /home/site/public_html/openemr/interface/super/ and paste the results ?

You’ll probably resolve this with a chmod -R (and maybe a chown) to make it happy again.

Thanks for the reply. Here is what I have after running that command:

drwxr-xr-x 3 sitename sitename 4096 May 2 15:09 .
drwxr-xr-x 32 sitename sitename 4096 Apr 22 15:41 …
-rw-r–r-- 1 sitename sitename 32256 Apr 22 15:41 edit_globals.php
-rw-r–r-- 1 sitename sitename 91783 Apr 22 15:41 edit_layout.php
-rw-r–r-- 1 sitename sitename 13694 Apr 22 15:41 edit_layout_props.php
-rw-rw-r-- 1 sitename sitename 56691 Apr 28 10:14 edit_list.php
-rw-r–r-- 1 sitename sitename 1661 Apr 22 15:41 layout_listitems_ajax.php
-rw-r–r-- 1 sitename sitename 7133 Apr 22 15:41 layout_service_codes.php
-rw-r–r-- 1 sitename sitename 7157 Apr 22 15:41 load_codes.php
-rw-r–r-- 1 sitename sitename 5295 Apr 22 15:41 manage_document_templates.php
-rw-r–r-- 1 sitename sitename 16335 Apr 22 15:41 manage_site_files.php
drwxr-xr-x 7 sitename sitename 4096 Apr 22 15:41 rules

I can see that one is set to -rw-rw-r-- 1 and the others are all -rw-r-r-- 1

So changing that should fix the issue then, correct?

Thanks
Robb

That was the fix. Thank you for your help!

Happy to assist you!

Note, however, that other files in the patch may have that same group-writable bit set, and may unpredictably hassle you at some point in the future – I would recommend seeking them out ( https://stackoverflow.com/questions/15247563/how-can-i-find-files-that-only-have-certain-permission-for-owner ) and adjusting them if it seems appropriate.

I just ran that and there are quite a few - so that would be an instance where I would run something like this:

find ~sitename/public_html/openemr . -type f -print0 | xargs -0 chmod 0644

to recursively change all files to 0644, correct?

Thanks
Robb

In practice, that sounds like it might be right, but I’ll never in my life try a command like that without a dry run – do xargs -0 echo chmod 0644 to make sure you like what the output looks like.

hi @apothik ,
We updated the patch 1 and also plan for future patches to have the 0644 permissions by default in order to avoid this issue in the future.
-brady