Global Moxie

http://globalmoxie.com/help/faq/bm1/cgi-tmpfile.shtml

Error uploading files: "CGI open of tmpfile: Permission denied"

Why do I receive this error message when trying to upload files?

This FAQ page is for Big Medium 1.x. It does not apply to Big Medium 2.0 or later.

This message is displayed when the web server does not have appropriate permission to any of the default directories where Perl normally tries to save uploaded files. It is most likely to occur on Windows servers and other non-Unix systems, and only occurs when you are uploading a file (a section template or an image file, for example).

The solution

  1. Create a directory named temp in your server's moxiedata directory. In Unix-based systems, you should set this directory's permissions to chmod 777.
  2. Locate the file named bm_lib.pl in the moxiebin directory and open it in a text editor. Locate this block of code at the top of the file:

    BEGIN { eval { require bytes; import bytes; } }
    use strict;
    use String::Multibyte;
    

    Immediately after these three lines, add two new lines:

    $CGITempFile::TMPDIRECTORY = "$bmSetup::MoxieDir/temp";
    $TempFile::TMPDIRECTORY = "$bmSetup::MoxieDir/temp";
    
  3. FTP the revised bm_lib.pl file to your server's moxiebin directory, making sure that your FTP client is set to "plain text" or ASCII mode.

After making these adjustments, the error message should go away and you should now be able to use Big Medium to upload files without problem.