Update to MailScanner-5.4.2-3 - htmlpurifier

Bugs in eFa 4
Post Reply
henk
Posts: 498
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Update to MailScanner-5.4.2-3 - htmlpurifier

Post by henk » 01 Dec 2021 13:24

After an update this morning to MailScanner-5.4.2-3

I noticed 2 errors in

Code: Select all

/var/log/php-fpm/www-error.log
1.
[01-Dec-2021 12:10:21 Europe/Amsterdam] PHP Notice: Undefined variable: dir in /var/www/html/mailscanner/msmail.inc.php on line 33

After a reboot this one is gone. ( due the restart of Mailscanner?)

2.
[01-Dec-2021 12:17:07 Europe/Amsterdam] PHP Warning: Directory /var/www/html/mailscanner/lib/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer not writable, please chmod to 777 in /var/www/html/mailscanner/lib/htmlpurifier/HTMLPurifier.standalone.php on line 15816


For the second one I had a look at http://htmlpurifier.org/download

Code: Select all

Installation
File permissions

HTML Purifier will write out cache files for HTMLDefinition in the subdirectories of HTMLPurifier/DefinitionCache/Serializer. If you are in the library/ folder of HTML Purifier, you can set the appropriate permissions using:

chmod -R 0755 HTMLPurifier/DefinitionCache/Serializer

If the above command doesn't work, you may need to assign write permissions to all. This may be necessary if your webserver runs as nobody, but is not recommended since it means any other user can write files in the directory. Use:

chmod -R 0777 HTMLPurifier/DefinitionCache/Serializer
To get rid of the error I executed:

Code: Select all

chmod -R 0777 /var/www/html/mailscanner/lib/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer

Code: Select all

ls -la /var/www/html/mailscanner/lib/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer

Code: Select all

total 0
drwxrwxrwx. 3 root    root    36 Dec  1 14:02 .
drwxr-xr-x. 3 root    root    24 Nov 22 03:14 ..
drwxr-xr-x  2 php-fpm php-fpm 67 Dec  1 14:02 HTML
-rwxrwxrwx  1 root    root     0 Nov 22 03:14 index.html

Shawn can you comment on this solution?
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams

User avatar
shawniverson
Posts: 3527
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Update to MailScanner-5.4.2-3 - htmlpurifier

Post by shawniverson » 01 Dec 2021 14:22

Probably just needs the user/group php-fpm, I'm guessing, instead of 0777. I'll test it out.

Post Reply