Hello

i'm trying to save all the attachments of osTicket on the filesystem, by using the "Attachments on the filesystem" in Version 0.3 with the newest Version of osTicket (v1.14.3) - It is a completly fresh install. I'm using also the theme "osTicketAWESOME" - The error occurs with and without that theme.

This are my options
Dashboard -> Information

Manage -> Plugins -> Attachments on the filesystem

My generel osTicket Information

Over my FTP client i created a new dir with the name "file_attachments" directly under the /httpdocs/ (osTicket is installed here too) - i've gaved that dir the permissions of "777"

i'm getting the following error over my dashboard:

IOException: Unable to read resource content

(root)/file_attachments/Y/Y3I_2XOqIRZUDlHJHeVE8RoscfyJ2WNY: Unable to read from file
Log Date: Thursday, September 24, 2020 2:02 PM IP Address: xxx.xxx.xxx.xxx

Any idea? Thank you!

    Shimo

    Either the file/folder doesn't exist on the Filesystem or the system cannot read/open the file. This is most likely a permissions issue. It doesn't matter if you have 777 permissions if it's not owned by the proper user:group.

    Cheers.

      Shimo

      I ran into this with a client's installation and was able to fix it quite easily. I did a few things, and I'm not sure if all of them were necessary, but here is what I recommend doing:

      Change the Base folder setting from your current relative path (file_attachments) to the absolute path on the server, which will look more like this:

      /var/www/vhosts/your-domain.com/support/file_attachments

      If that doesn't fix the issue, grab the latest copy of the plugin, upload it to /includes/plugins, go to Admin Panel > Manage > Plugins and disable and then reenable it, and you should be good to go.


      That's what worked for me, but KevinTheJedi has a good point about permissions.

      Make sure that the file_attachments directory has is owned by the same account:group that your main website runs under.

      If I go to my main web root directory and run ls -l I can see what account/group owns the files

      drwxr-xr-x. 9 rede psacln 4096 Jun 3 2018 wp-admin
      drwxr-xr-x. 11 rede psacln 4096 Jul 20 13:35 wp-content
      drwxr-xr-x. 18 rede psacln 12288 Jun 3 2018 wp-includes

      In my case, the files are owned by account rede and group psacln.

      Therefore, I can set the correct ownership like so:

      chown -R rede:psacln support/file_attachments

      Mind you, if you use Ubuntu you'll have to set both the owner and group to www-data, like so:

      chown -R www-data:www-data support/file_attachments

      Also, for CentOS it's either:

      chown -R httpd:httpd support/file_attachments

      or

      chown -R apache:apache support/file_attachments

      ... depending on what version of CentOS you're running.

      Cheers.

      Write a Reply...