-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attachments on the filesystem plugin doesn't seems to work with 1.15.3.1 #215
Comments
I am not able to replicate this using Apache, v1.15.4, PHP 7.4, and MySQL 8.0 (ie. plugin works just fine). Cheers. |
I double check before filling the bug, and permissions on the file system are correct :
With plugin "attachment on filesystem" activated, when we send an email with an attachment, it seems that OSTicket can't create the file for whatever reason, and end up using database storage as a backup. So we deactivate the plugin, and now we have errors everytime a mail with a file attached is retrieved...So maybe it's not the plugin itself, but there's clearly a problem with backend storage subsystem...(maybe only related to our instance, but i cant figure it out)
|
Cheers. |
Could it be this ? On line 72 of storage-fs osTicket-plugins/storage-fs/storage.php Line 72 in f00b381
second argument is permissions, which should be as an octal number (0751) (https://www.php.net/manual/en/function.mkdir.php) Therefore it create a directory with permissions : I cant modify the plugin to test, as |
No, Cheers. |
I know, but on line 72 perms are non octal (0 is missing) so the behavior is not the one expected. As it should be :
As this is now on storage.php :
see ? On the second example, perms are messed up : user has no read access, and others had sticky bit ... |
Yes, we were discussing this further and thought the octal might be an issue. I’m in the process of making a custom build of the plugin and let you test to see. Cheers. |
Below is a build of the plugin with Cheers. |
Hi @JediKev , Thanks for this test version, the permissions are no longer changing to something messed up but OsTicket still can't create files :
Still digging... |
Are you running SELINUX by chance (you can check by running With a lot of the Red Hat distros (and others) they have SELINUX installed and enabled by default. This typically has pretty tight security so you have to add a context in order for Apache to read/rewrite certain directories and files. Cheers. |
Hi, Unfortunately no, we use Ubuntu Server 20.04 and completely deactivated selinux on non critical servers...
Btw we have this plugin activated on Osticket on CentOS 7.9 which run fine, it seems that the problem stick with Ubuntu 20...Maybe the php or apache version had influence ? |
was this solved? |
No, but i'm stuck with 1.15.8, can't test with newer versions of OsTicket. |
plugin worked, but with 1.15.3.1 it doesn't work anymore : any attachment uploaded is put in the database, and admin receive an alert :
IOException: Unable to read resource content (root)/files//H/Hr3Ow[...]KrrjXgqxPI5mw:Unable to open for reading
Directory
/var/www/html/osticket/files
is readable and writable by apache user...Can't figure out what is happening, no other error messages....
The text was updated successfully, but these errors were encountered: