Bird
0
0

A user tries to unzip a file with unzip archive.zip -d /destination but gets a permission denied error. What is the best fix?

medium📝 Debug Q7 of 15
Linux CLI - Archiving and Compression
A user tries to unzip a file with unzip archive.zip -d /destination but gets a permission denied error. What is the best fix?
ARun the command with sudo to get permissions
BRemove the -d option and unzip in current directory
CUse zip instead of unzip
DRename archive.zip to archive.tar
Step-by-Step Solution
Solution:
  1. Step 1: Understand permission denied error

    The error means the user lacks rights to write to /destination directory.
  2. Step 2: Choose appropriate fix

    Running with sudo grants needed permissions. Removing -d changes destination but may not be desired. Other options are unrelated.
  3. Final Answer:

    Run the command with sudo to get permissions -> Option A
  4. Quick Check:

    Permission denied fix = use sudo [OK]
Quick Trick: Use sudo if permission denied writing destination [OK]
Common Mistakes:
  • Removing -d without permission fix
  • Confusing zip and unzip
  • Renaming archive without reason

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes