Page 1 of 1

[SOLVED] Download backup link is not working

Posted: Thu May 14, 2015 4:33 pm
by vlahonick
I am having the same problem with the guy in this post viewtopic.php?f=16&t=4491 but no solution there plus some weird off topic comments.... Anyway sorry for intentionally duplicating the topic but in this forum every old topic without solution is buried...

I recently used the Vesta backup restore in my VPS to restore some websites. Up until then I could download the backups with the link without problems. After the restore the backup download link gives me an error on the browser. I am not sure if it is actually related, just saying... Ftp download is working normally. I restarted vps, ngnix, apache and vesta several times but no effect.

Vesta is installed in a 14.04 xubuntu vps.

Screenshot of the problem:
Image

Re: Download backup link is not working

Posted: Sun May 17, 2015 4:33 pm
by skurudo
What's in apache error log?

Re: Download backup link is not working

Posted: Mon May 18, 2015 7:37 am
by vlahonick
Typing this:

Code: Select all

nano /var/log/vesta/nginx-error.log
Give me this:

Code: Select all

2015/05/16 12:02:16 [error] 6271#0: *122 open() "/backup/admin.2015-05-11.tar" failed (13: Permission denied), client: 82.76.60.9, server: _, request: "GET /download/b$load/backup/?backup=admin.2015-05-11.tar HTTP/1.1", upstream: "fastcgi://unix:/var/run/vesta-php.sock", host: "mydomain.com:8083"
So it is obviously a permission problem but I didn't changed a thing on permissions... Anyway how could I fix this? What the default permissions should be for the admin user?

Re: Download backup link is not working

Posted: Mon May 18, 2015 7:57 am
by skurudo
vlahonick wrote: So it is obviously a permission problem but I didn't changed a thing on permissions... Anyway how could I fix this? What the default permissions should be for the admin user?
Yep, show us please output this commands:
ls -la /home
ls -la /home/backup

Re: Download backup link is not working

Posted: Mon May 18, 2015 7:37 pm
by vlahonick
skurudo wrote:
vlahonick wrote: Yep, show us please output this commands:
ls -la /home
ls -la /home/backup
ls -la /home:

Code: Select all

drwxr-xr-x  4 root  root  4096 Apr 22 16:23 .
drwxr-xr-x 24 root  root  4096 Apr 30 12:42 ..
drwxr-xr-x  6 admin admin 4096 Apr 15 16:36 admin
drwx------  2 root  root  4096 May 11 10:58 backup
ls -la /home/backup:

Code: Select all

drwx------ 2 root  root       4096 May 11 10:58 .
drwxr-xr-x 4 root  root       4096 Apr 22 16:23 ..
-rw-r----- 1 admin admin 885094400 May  1 05:02 admin.2015-05-01.tar
-rw-r----- 1 admin admin 888729600 May  5 05:03 admin.2015-05-05.tar
-rw-r----- 1 admin admin 899737600 May 11 10:58 admin.2015-05-11.tar

Re: Download backup link is not working

Posted: Mon May 18, 2015 7:53 pm
by skurudo
Make

Code: Select all

chown backup:backup /home/backup
and test again

Re: Download backup link is not working

Posted: Tue May 19, 2015 9:13 am
by vlahonick
skurudo wrote:

Code: Select all

chown backup:backup /home/backup
It didn't work. Now the ls -la gives me:
drwx------ 2 backup backup 4096 May 11 10:58 .
drwxr-xr-x 4 root root 4096 Apr 22 16:23 ..
-rw-r----- 1 admin admin 885094400 May 1 05:02 admin.2015-05-01.tar
-rw-r----- 1 admin admin 888729600 May 5 05:03 admin.2015-05-05.tar
-rw-r----- 1 admin admin 899737600 May 11 10:58 admin.2015-05-11.tar
I also tried with 777 permissions and backup:backup user directly in the archive but still didn't work.

Re: Download backup link is not working

Posted: Tue May 19, 2015 9:05 pm
by joem

Code: Select all

chown -R backup:backup /home/backup 

Re: Download backup link is not working

Posted: Wed May 20, 2015 12:54 pm
by vlahonick
joem wrote:

Code: Select all

chown -R backup:backup /home/backup

Thank you all for your suggestions! Finally it worked with the code below (the -R was missing all along):

Code: Select all

chown -R admin:admin /home/backup