I added and activated the Filesystem attachments plugin with osTicket v.1.14.

I set it as the desired attachment mode in Settings:

I see a few folders have been created by the system inside the attachments folder:

But in none of those folders I can find the attached files, so I don't know where they are actually being stored.

And of course I created new tickets with attached files after setting the plugin up, to test it.

Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance. The more information you give us the better we will be able to assist you. Thank you.

Environment details?
Version of osTicket?
PHP error logs?

    ntozier Sorry for not providing that information.

    I am using osTicket v1.14.1 (f1e9e88) with PHP 7.2.26 and in a LiteSpeed environment.

    All recommended PHP extensions are enabled except APCu.

    The attached files are actually being displayed on the front-end, but I do not find them in the attachments folder that I selected in the Plugin configuration.

    Go to Admin panel -> Settings -> System
    Down at the bottom is Attachments Storage Settings
    Is that set to In the database?

    Go to Admin panel -> manage -> plugins
    Does it say "Enabled" in the Status column for the Attachmens::Filesystem plugin?

    Have you migrated your attachments drom the database to the filesystem?

    You have to do this manually at a prompt.
    php setup/cli/manage.php file migrate --backend D --to F --limit=20

    note: --limit=20 only does 20 files. I added this so you can see if it is going to work with a small test case. If you have a LARGE number of attachments it might not be able to do them all before the php time out is reached so you will want to run the command a few times with a sane number (like 100) until it does them all.

      ntozier

      Thanks for your kind and detailed answer.

      As you can see in my first post inside this current topic, I did set the Attachment Storage Settings to the filesystem (via the plugin).

      And yes, the plugin is Enabled.

      I also don't have any old attachments because this is a fresh installation (I just discovered the amazing osTicket project two days ago).

      The thing is that, after uploading new attachments I just went to the attachments folder (out of curiosity, to see how files are structured).

      And to my surprise, inside that folder, there aren't any attachmente files, but some folders (see screenshot of the containing folders on my post above) and a .keep file.

      What can I do to provide more information about this?

      Thanks for your time.

      Yeah i saw that you said that and posted a screen shot, but it wasn't in English so I was just making sure. 🙂

      So when a file gets uploaded PHP puts it in a temp directory.
      Then once it's completed, it moved the file to where it should be (and likely renames it).
      The most likely reason I can think of as to why this is failing is ownership/permissions.
      I would think that if the move failed that there would be a log entry in your PHP error logs.

      I would check the permissions on the your PHP temp directory (see your php.ini to locate it), the permissions on the upload directory (and any subsequent ones under it), and check your PHP and webserver error logs.

      As a side note, we do not support litespeed as a webserver with this product. People have gotten it to work but there might be configuration settings that you need to change with litespeed to get it to work. I'm not convinced that is the problem with this though.

      I kept testing and even added 777 permissions to the folder (and subfolders).

      No PHP error log is shown and the files are actually being saved into the database.

      I am hyper sure that the plugin is enabled and that the setup is done right.

      When a new file is attached a new empty folder is being created in the attachments folder.

      So, this might be caused by the use of LiteSpeed, as you mentioned.

      Thanks again.

      4 months later

      Had the same problem but heading in the direction of a solution though not quite there yet. I include all my steps as it may help others.

      Just upgraded from 1.14.1 to 1.14.2
      osTicket Version v1.14.2 (cba6035) — Up to date
      Web Server Software Apache
      MySQL Version 5.6.47
      PHP Version 7.3.14
      CentOS Linux release 7.7.1908

      (After install, Settings shows osTicket (v1.14.2) though there was no upgrade processing from 1.14.1. I assume that is OK).

      I had included this plugin in the download and there was a surprisingly small extra file (storage-fs.phar) which I installed per instructions, set a Base Folder path (/sites/osticket/attachments) with folder attachments owned by apache, and enabled the plugin. All looks OK (The warning message when setting the path went away once I changed owner to apache)

      I selected 'Filesystem' in Settings page for Attachments.

      But when I added an attachment (using the Attachment tab in an FAQ) I could not see any file in the 'attachments' folder (other than zero length .keep)

      I checked the php log immediately after the attach and there were no errors.

      I then changed the ownership of the attachments folder from 775 to 777 and it worked. But that is really an issue as it makes the folder publicly accessible - so I put a dummy index.php in the folder as a work-round.

      The next issue is that while deleting an attachment removes it from the document, it does not delete the saved file from the folder. Neither does it delete the MySQL record in ost_file.

      These look like bugs but maybe I'm doing something wrong.

      4 months later

      alvarofranz, were you able to resolve this issue. I am running to same problem. The attachments are working fine and I am even able to download or view the files successfully after attaching. The target folder to store attachments keeps creating empty folders but no contents inside. Files are not being uploaded in database either so it's mystry exactly where the files are landing and working from.

      Write a Reply...