apache-maven-3.6.0.zip: Permission denied

while running the below command i am facing this error

wget -O apache-maven-3.6.0.zip
apache-maven-3.6.0.zip: Permission denied

1 Answer

This is because you are in a directory not writable to your current user.

Try this instead. You will find the application downloaded and saved to your desktop.

cd ~/Desktop/
wget -O apache-maven-3.6.0.zip

Example:

In my home directory, download is successful:

subroot@subroot:~$ wget -O apache-maven-3.6.0.zip
--2019-05-15 11:06:47--
Resolving us.mirrors.quenda.co (us.mirrors.quenda.co)... 108.61.245.101, 2001:19f0:a:5::28a6
Connecting to us.mirrors.quenda.co (us.mirrors.quenda.co)|108.61.245.101|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9102386 (8.7M) [application/zip]
Saving to: ‘apache-maven-3.6.0.zip’
apache-maven-3.6.0.zip 100%[================================================================================>] 8.68M 1.59MB/s in 13s
2019-05-15 11:07:01 (700 KB/s) - ‘apache-maven-3.6.0.zip’ saved [9102386/9102386]
subroot@subroot:~$

But if I change to the root folder / I can't download because I don't have permission to write to that folder.

subroot@subroot:~$ cd /
subroot@subroot:/$ wget -O apache-maven-3.6.0.zip
apache-maven-3.6.0.zip: Permission denied
subroot@subroot:/$
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like