Page 1 of 1

HTTPError 403 client Error: Forbidden for URL ...

Published: May 15, 2019 - 2:59 PM
by lowix
Hello,

Following the application of update 1.7.4, I am getting a 403 error on my main repository URL:

Picture
Also :
Picture

Code: Select all

# ls -la /var/www/
total 180
drwxr-xr-x   7 www-data www-data   4096 oct.   3  2018 .
drwxr-xr-x  12 root     root       4096 avril 20  2018 ..
drwxr-xr-x   2 root     root       4096 avril 20  2018 html
-rw-r--r--   1 root     root         26 mai   15 14:09 robots.txt
drwxr-x---+  5 wapt     www-data  40960 mai   15 14:19 wapt
drwxr-x---   3 wapt     www-data 110592 mai   15 12:35 wapt-host
drwxr-x---   2 wapt     www-data   4096 avril 20  2018 wapt-hostref
drwxr-x---   2 wapt     www-data   4096 oct.   3  2018 waptwua

# groups wapt
wapt : www-data
I suspect an nginx configuration problem, but which one?

Any ideas?

Re: HTTPError 403 client Error: Forbidden for URL ...

Published: May 15, 2019 - 4:19 PM
by lowix
I solved the problem with a:

Code: Select all

# chmod -R 754 /var/www/wapt* 
Before :

Code: Select all

# ls -la /var/www/
total 180
drwxr-xr-x   7 www-data www-data   4096 oct.   3  2018 .
drwxr-xr-x  12 root     root       4096 avril 20  2018 ..
drwxr-xr-x   2 root     root       4096 avril 20  2018 html
-rw-r--r--   1 root     root         26 mai   15 14:09 robots.txt
drwxr-x---+  5 wapt     www-data  40960 mai   15 14:19 wapt
drwxr-x---   3 wapt     www-data 110592 mai   15 12:35 wapt-host
drwxr-x---   2 wapt     www-data   4096 avril 20  2018 wapt-hostref
drwxr-x---   2 wapt     www-data   4096 oct.   3  2018 waptwua
After :

Code: Select all

# ls -la /var/www/
total 180
drwxr-xr-x   7 www-data www-data   4096 oct.   3  2018 .
drwxr-xr-x  12 root     root       4096 avril 20  2018 ..
drwxr-xr-x   2 root     root       4096 avril 20  2018 html
-rw-r--r--   1 root     root         26 mai   15 14:09 robots.txt
drwxr-xr--+  5 wapt     www-data  40960 mai   15 15:43 wapt
drwxr-xr--   3 wapt     www-data 110592 mai   15 15:36 wapt-host
drwxr-xr--   2 wapt     www-data   4096 avril 20  2018 wapt-hostref
drwxr-xr--   2 wapt     www-data   4096 oct.   3  2018 waptwua

Re: HTTPError 403 client Error: Forbidden for URL ...

Published: May 24, 2019 - 1:56 PM
by sfonteneau
Strange, you have a small + next to the wapt folder, this means that ACLs have been set.

Code: Select all

drwxr-x---+  5 wapt     www-data  40960 mai   15 14:19 wapt

You can correct it with:

Code: Select all

setfacl -b -R /var/www/*
chown -R wapt:www-data /var/www/*

Re: HTTPError 403 client Error: Forbidden for URL ...

Published: May 24, 2019 - 3:27 PM
by lowix
Thank you,
I applied your fix.
Perhaps it was due to the fact that I had initially set up a secondary repository with Syncthing, which I subsequently uninstalled. :|