Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Cannot attach images to cases


#1

When I attempt to attach a .jpeg to a case, I receive an error message stating “An error occurred while renaming the attachment.”

I have a defined “storage/attachment” dir defined (and permissions set) - followed the installation guide to do so.

Am I missing something? Perhaps this is a known issue?


#2

This occurred on 2.5.1 and 2.6


#3

Hello Knaledge,

This looks like a permission issue. The rename operation is performed after the attachment has been uploaded to the temp directory of your web server (and is intended to move the file from there to TestRail’s attachment directory). This usually indicates that you are not allowed to a) add new files to the target directory (TestRail’s attachment directory) or b) remove files from the source directory (temp directory). Could you please check the permissions of the temp directory for the user of the web server?

Regards,
Tobias


#4

Hi Tobias -

I am still having an issue with this. How exactly should I prepare both the php.ini file and the directories (permissions) for attachments?

In my php.ini file, I am using open_basedir as follows (Windows):

open_basedir = “c:\inetpub;c:\TestRail\Attachments”


#5

Hello Knaledge,

Thanks for the update. I believe the temp directory of Windows would need to be part of the open_basedir configuration as well. For testing purposes, could you please omit/comment out the open_basedir line, restart the web server and try the upload again?

Regards,
Tobias