Attachments intermittently vanish after submitting a ticket or reply. The file appears in ost_file but no record is created in ost_attachment.
Orphaned files in ost_file can exist when associated objects (Tickets, thread entries) are deleted -- osTicket runs a cleanup script on cron that removes them after 24 hours. For true intermittent attachment loss (file uploads without linking), the cause is usually webserver/PHP configuration: check upload_max_filesize, post_max_size, max_execution_time, max_input_time, and PHP temp directory write permissions. Upgrade to v1.18.2+ and restart the webserver and PHP-FPM. Query orphaned files with: SELECT f.* FROM ost_file f LEFT JOIN ost_attachment a ON f.id = a.file_id WHERE a.file_id IS NULL;
Originally sourced from forum.osticket.com . osFAQ.org summarises community knowledge for quick reference.