Open ssl decrypt problem - error writing output file

Some years ago, I encrypted (on Linux) a very imporant file with command:
openssl aes-256-cbc -a -in FILE.ZIP -out FILE.ZIP.enc

Now I want to descript it on Linux or Mac, and I got an error:
openssl aes-256-cbc -d -a -in FILE.ZIP.enc -out FILE.ZIP
enter AES-256-CBC decryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
error writing output file

I run it on docker image with old Ubuntu (ubuntu:bionic-20200112), but I got the same problem,.
I am sure the password is fine. I made a note what is the password (that was stupid) but still doesn’t work.

I would be very gratefull for help.

Interesting. I have tried your encryption and decryption procedure. I also encounter the WARNING but it did not effect the outcome. Have a look here:

Encrypt:

$ openssl aes-256-cbc -a -in test.txt -out test.txt.enc
enter AES-256-CBC encryption password:
Verifying - enter AES-256-CBC encryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.

Decrypt:

$ openssl aes-256-cbc -d -a -in test.txt.enc -out test_enc.txt
enter AES-256-CBC decryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.

I think we can rule out the warning message. To start try to use -v option for verbose:
openssl aes-256-cbc -d -a -in FILE.ZIP.enc -out FILE.ZIP -v

I’m sure that this is rather trivial, but ensure that you have write permissions and that there is enough disc space available to encrypt the file.

I run it and the error is:

Try the following and let me know:

openssl aes-256-cbc -d -a -in FILE.ZIP.enc -out FILE.ZIP -v -nopad

ok, I run

openssl aes-256-cbc -d -a -in FILE.ZIP.enc -out FILE.ZIP -v -nopad
bufsize=8192
enter AES-256-CBC decryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
bytes read   : 1650415890
bytes written: 1218768640

but now, when I tried to unzip it, it looks like the file is broken.

unzip FILE.ZIP
Archive:  FILE.ZIP
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of FILE.ZIP or
        FILE.ZIP.zip, and cannot find FILE.ZIP.ZIP, period.

Yeah, feels like corrupted file from the start. You may try to repair it:

zip -F FILE.ZIP --out FILE_FIXED.ZIP
OR
zip -FF FILE.ZIP --out FILE_FIXED.ZIP

Or try another tool:
7z x FILE.ZIP

In my case was only a disk space problem. I had /tmp mapped in memory and limited to 16G, I noticed only because of a warning I was receiving opening a new terminal window.

It was just a case of using the hard disk. Hope this helps.