So I just finished moving everything over to a new server and everything is operational but accessing attachments on the filesystem, both screenshots and files from before the migration. New attachments are working fine.

Things ive tried:

  1. I've put the old attachments folder in the same location as the old server and even given it 777 with www-data as the user:group.
  2. increased the file size limit to 32Mb
  3. Made sure plugin is enabled and updated. even from the settings page dropdown it says filesystem:/path/to/attachments

Some things ive noticed but im not knowledgeable enough to piece anything together. when looking in the ost_file table I can see allllll the old attachments and the dk is showing F (from googling this means im good to go on the filesystem?) and I can even see the file name of the files I am unable to open from within the ticket as well as their hashed name. So I would think it has to be some weird permission issue or somehow when clicking the file in the ticket it is going to the wrong place in the attachments folder?

Any help would be appreciated here! Thanks!

Edit: after trying 100s of attachments on previous tickets I found a couple that are working... Seems to only be screenshots though, haven't found an actual file that will download. Not sure what this means

    it-law-man

    Check your logs (general server logs, webserver error logs, PHP error logs, MySQL/MariaDB error logs, osTicket System Logs, Browser Console logs, etc.) for any related errors. If you moved to a Linux machine see if SELinux is enabled. If enabled it may be restricting access to files.

    Cheers.

      KevinTheJedi

      The only relevant log is in the osticket logs and it tells you what file could not be accesses

      What is weird is it seems like its 50/50 at this point what attachments are able to be seen/downloaded. I was planning on just leaving it but turns out it wont let you reply to a ticket where the attachment cant be loaded.

      Also selinux is not installed

      Edit: Just came accross this log as well. Not sure if related or not

        KevinTheJedi
        No we were using centos and now we are on ubuntu. I actually found the solution. At some point all the files in the attachments folder with upper and lower case files were all put into the same folder rather than their respective folders with the correct casing. I moved all files into their appropriate folders and all is good now. I'm guessing that when i used winSCP to copy the attachments folder from the old one it just merged the two folders into one.

        As always thanks for the tips!

        Link to the forum post I found that led me to this solution.
        https://forum.osticket.com/d/102481-migrate-attachments-from-db-to-filesystem-ioerror-unable-to-open-for-reading

          Write a Reply...