1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Mini-bug: Attachments do not work on NFS

Discussion in 'Resolved Bug Reports' started by Rigel Kentaurus, Mar 28, 2013.

  1. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    This week I was pimping up my setup a little (since, again, I have exceeded my traffic expectations), and I am now writing all the attachments to a drive shared through NFS, which allows me to do some cluster balancing over the requests while still sharing the data.

    However, the attachments do not work because they use rename(), and rename() does not like two physical drives (as in /tmp and an NFS mount)

    I applied a mini-patch on DataWriter/Attachment.php

    instead of

    Code:
                $success = rename($source, $destination);
    
    I am now using

    Code:
                $success = copy($source, $destination);
                @unlink($source);
    
    And attachments are now back in service
     
    HWS likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    Ironically, I changed this yesterday as I was improving the ability to store attachments on S3. It tries a move/rename and then falls back to a copy+unlink instead.
     
    DeltaHF, TheBigK, Slavik and 4 others like this.
  3. md_5

    md_5 Well-Known Member

    Sorry for the huge necro, but what's that about s3 support?
     
    DeltaHF, Adam Howard and Jeremy P like this.

Share This Page