When more independent Liferay installations are set to Amazon S3 and same bucket, data can be rewritten with no information at application server log file at all.
File structure is composed from unique document ID. If database files are separated from each other, Liferay doesn't check if destination location exists and write document, no matter if there any file exists with same document ID.
Steps to reproduce:
1) Set up two Liferay installations with Amazon S3 and the same bucket.
2) Under same company and web ID upload text document to first Portal.
3) Upload another text document with same type to second Portal.
4) Download uploaded file from first Portal and check it's content. The downloaded file is the one uploaded via second Portal and expected is to have file uploaded via first Portal
My exact steps:
1) Set up two installations of "Liferay Portal 6.1.1 GA2 bundled with Tomcat".
2) Set up portal-ext.properties files to Amazon S3 on the same bucket.
3) Start both instances and delete all existing sample files.
4) Create text documents A.txt and upload it to documents library.
5) Create text document B.txt with different content and upload it to second installation's documents library.
6) Try to download original file A from first installation and check that are correct. In my case, insted of A document I get B
It might be good to check if destination directory exists or not. If destination is used, increment document ID and try again (as probably done for local file storage).
On local file system as a repository issue does not appear and process works as expected. Liferay detects that some file with certain document ID exists already and automatically increases document ID until it finds suitable free document ID.