17:51 - Sunday, 20 April 2014

Getting Permission Denied Error With Wget

#Topics: access denied error in command for wget,get permission denied when using wget,search wp-config with wget,wget access file with permissions,wget Cannot write to Permission denied

I installed LAMP stack on my ubuntu 11.04 with

sudo apt-get install lamp-server^

Now I navigate to /var/www and use

wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz

I get the following error

–2011-08-03 13:59:00–
http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz Resolving
ftp.drupal.org… 64.50.233.100, 64.50.236.52 Connecting to
ftp.drupal.org|64.50.233.100|:80… connected. HTTP request sent,
awaiting response… 200 OK Length: 2757101 (2.6M)
[application/x-gzip] drupal-7.x-dev.tar.gz: Permission denied

Cannot write to `drupal-7.x-dev.tar.gz’ (Permission denied).

I have no clue how to resolve this error.

UPDATE :

I tried to download the same file in downloads folder, it went on without an issue. So it seems to be some permission error, but I’m not sure about that or how to solve it.

I believe you need root permissions to write to /var/www. So you should use sudo in front of your command i.e

sudo wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz

Share

Advertisement

Comment