Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Attachments on the filesystem - no files appear

Appologies if this has been done but I have had a look around and could not find any references to my problem. 

I have upgraded to 1.9.2 from 1.8.x and thought I would give the "Attachments on the filesystem" plugin a go as I have database size restriction on my hosting plan so thought this would be a good way to keep it within limits. 

Everything is working correctly up to the creation within my "attachments" folder inlcuding a ".keep" file and folders named only with one letter (one per ticket that has a file attached). But the attachment itself does not appear. Where is it? Am I looking in the wrong place? Am I interpretting this plugin all wrong??

Help appreciated. :o)

PS. I'm running a test verson before exporting to my live system so can experiment freely with any suggestions.

Comments

  • You installed the plugin in the /include/plugins folder?
    You went to Admin p[anel -> Manage -> Plugins and enabled it?
    You clicked on the Plugin and configured it? (added the path) and clicked Save Changes?
    You then went to Admin panel -> Settings -> Tickets and scrolled down to "Store Attachments:" and changed it to Filesystem: Attachments?
  • Yes, definately. All the steps done.

    And I have since seen that the "attachments" folder I created to store the attachments is creating empty folders for every incoming ticket that has a file attached. But no attachments within. I have tried changing the permissions to 777 to see if that could have anything to do with it.
  • Let me know if you see any errors in your php error log, and if the permissions change you made helps.

  • No errors. The permissions have made no difference. The weird thing is that new empty folders appear for every ticket with a file attached so clearly the folder is being written to. Just no attachment file!
  • I too had similar issues with it since the v1.8 plugin. I finally gave up on it and reverted back to attachments on database.
  • @v8evo can you provide some more information about your setup please?
    User this thread as a guideline: Please read before requesting assistance.
    Thanks
  • edited July 2014
    Looking at the server log entries there is nothing. 

    This is all the system info I have: 

    osTicket Version v1.9.2 (4827655) 
    Server Software Apache 
    PHP Version 5.3.28 
    MySQL Version 5.5.37 
    PHP Extensions
    gdlib Used for image manipulation and PDF printing 
    imap Used for email fetching 
    xml XML API 
    xml-dom Used for HTML email processing 
    json Improves performance creating and processing JSON 
    gettext Improves performance for non US-English configurations 
    mbstring Highly recommended for non western european language content 
    phar Highly recommended for plugins and language packs PHP Settings
    cgi.fix_pathinfo = 1 "1" is recommended if AJAX is not working 

    Database Usage 
    Database Space Used 2.30 MiB 
    Database Space for Attachments 0.02 MiB 

     Thanks for your time on my issue.
  • One last question before I point this thread out to the devs...
    You have configured your PHP to allow and handle file uploads right?


  • I followed the basic install plugin, go to admin etc but have just spotted this part which I'm sorry to say I haven't done.... 

    After cloning, hydrate the repo by downloading the third-party library dependencies. 
    php make.php hydrate 

     Is this maybe what you mean? 

    To be honest I'm a bit lost as to what "hydrate" means. I'm very much self taught on all this and rely and following more decriptive instructions. :)

    Thanks again. 
  • the hydrate command downloads the required things for the plugin.
    This has nothing to do with as to if your PHP on your server is configured to allow file uploads.
    Your instance of PHP on your server (even if hosted) has a php.ini that controls all the possible configuration stuff.  There are a number of settings that are required at the server level in your php.ini to allow file uploads.  I would think that you would see an error in your php error logs if they were not set, but figured that I should make sure.
  • edited July 2014
    OK, cool. Thanks for clearing that up, I thought I had messed up! 

    I've had a good look at the logs and there are no errors, but here's the thing, I have a second beta site set up on a 1and1 shared server and have run some tests. Here it is working fine! 

    So clearly I am installing this OK. I'm wondering if my shard hosting server, which has an agressive firewall, is messing things up...

  • Actually, I have spotted a problem on the 1and1 beta site I'm testing on.

    It does work, but only after I change the file permissions of the subdirectories that get created within my attachments folder.

    The plugin creates a new folder for every attachment named with a single letter. This new directory is created with 305 permissions. I have to change the file permissions to 777 or 755 in order to view the file. I'm assuming that the file is there all along, just that I can't see it. 

    I mention this because if this is the norm, then many might report a problem of not seeing the attached file when in actual fact it is there but they need to change the folder permissions in order to see it. At least that's what I'm guessing.....
  • generally speaking when a file gets uploaded (via PHP) it get dropped into a temporary folder.  Once the file is completed it gets moved to the new location on the back end [note: this is how the server handles files, not osTicket specifically].  However this generally means that permissions can be a real b****. In your case it seems that your server is not properly changing the ownership or permissions on the file after its upgraded.  I think that you should probably speak to your hosting company and ask them if they have any idea whats going on with this.
  • OK, will have a chat with them and see what they say. Thanks.
  • Ok, so the "problem" is permissions but it is not a problem in the true sense. The files are going to the folder correctly, the only thing is I don't see them because the 1305 permissions don't let me! Not an issue in the end as I don't really care if I can see the files or not so long as I know that they are being saved out of the database. If I ever need to rescue a file I know I can get it no problem.

    Please feel free to close this.

    Thanks.
This discussion has been closed.