tar: Exiting with failure status due to previous errors

PROBLEM

When creating a compressed archive file:-

tar -zcvf apps.tar.gz apps

… the following error is thrown:-

tar: Exiting with failure status due to previous errors

SOLUTION

This error usually occurs due to permission issues.

However, the error messages are hidden beneath gobs of output activated by the verbose flag.

To fix this, reduce the output by removing the -v flag:-

tar -zcf apps.tar.gz apps

… and now, the error message appears:-

tar: apps/apps.key.enc: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors

Once the problem is fixed, the command will run successfully.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s