Question

I have been trying to download WordPress using wget to a new CentOS VPS I am setting up:

wget -v http://wordpress.org/latest.tar.gz
--2014-04-28 07:15:43--  http://wordpress.org/latest.tar.gz
Resolving wordpress.org... 66.155.40.250, 66.155.40.249
Connecting to wordpress.org|66.155.40.250|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5810471 (5.5M) [application/octet-stream]
latest.tar.gz: Permission denied

Cannot write to “latest.tar.gz” (Permission denied).

the folder blog into which I want to add the blog has the following permissions:

ls -lhd /var/www/html/blog/
drwxr-sr-x 2 root apache 4.0K Apr 28 06:45 /var/www/html/blog/

ls -lhd /var/www/html/
drwxrwsr-x 3 root apache 4.0K Apr 28 06:45 /var/www/html/

and my id is

id
uid=500(me) gid=500(me) groups=500(me),10(wheel),48(apache)

The issue still seems a permission issue even though I am part of the Apache group and the directory is as well. What am I missing here?

Was it helpful?

Solution

Well it seems I needed to make the folder owner equal to the owner doing the wgetting. This does make sense. It was just that I initially thought that being part of the group apache would suffice. But the latter would require chmod 777 or at least 775 and that would be a risky thing to do. So now that the owner of the folder has been adjusted all is good.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top