This does not appear to have anything to do with osTicket. It appears to have everything to do with your web server and permissions.When a file is uploaded via PHP it is put into the PHP temp folder. Once it has completed uploading it is moved to its destination folder. This meant that file is created with the permissions of the temp folder. When it is moved it keeps its permissions. Additionally the webserver runs as a specific user. Said user needs permission to the destination folder (and sub folders).