The issue may happen when an unexpected error occurred during the upload process.
To delete the 0 KB files, do the following:
Admin Solution 1: Delete a specific 0 KB file
- SSH login to SafeSync for Enterprise server (either appliance1 or appliance2).
- Go to SafeSync OSDP bin directory.
cd /opt/TrendMicro/OSDP/bin
- Find the 0 KB file owner's user ID using the user's login name.
sudo ./userTool.pl -u <user_login_name> show | grep "^ID:"
- Find the user's personal folder ID (displayed as "object_id") using the user ID taken from previous step.
sudo ./objTool.pl -u <user_id> show | grep "object_id:"
- List all files under the user's personal folder using the user ID and object ID taken from the two previous steps. Find the file ID of 0 KB file, which is located at the beginning of the line containing the 0 KB file name.
sudo ./objTool.pl -u <user_id>-<object_id> tree | less
For example, if the 0 KB file name is "test.img", then its file ID is "5-111".
5-11 folder !home
5-111 file test.img - Delete the file using the file ID.
sudo /opt/TrendMicro/OSDP/Bin/objTool.pl -i <file_id> -f delete
Admin Solution 2: Delete all 0 KB files
- SSH login to SafeSync for Enterprise server (either appliance1 or appliance2).
- Run the command below to list all files with 0 byte size.
mysql -uroot -psafesync -e "select concat(user_id, '-', object_id) as object_id, name, (select name from osdp.users u where u.user_id = o.user_id) as belong_user_name from shard_1.objects o where size = 0 and type = 'file';"
- Find the file's object_id from the result above and use the command below to delete the files.
sudo /opt/TrendMicro/OSDP/Bin/objTool.pl -f -i <object-id> delete
End-User Solution
- Log in to SafeSync User Portal.
- Re-upload the file (with the same file name) and choose to overwrite the existing one.