Migrating data from centos 7 to ubuntu

The error logs with full path are these:

[error] 31437#31437: *297 open() "/opt/indico/cache/assets_global_3.3.3_3267867581.js" failed (13: Permission denied)
[error] 31437#31437: *297 open() "/opt/indico/archive/event/46/images/16-png" failed (13: Permission denied),

And the outputs of ls -ld are,

root@omeg:~# ls -ld /opt/indico/cache/assets_global_3.3.3_3267867581.js
-rw-r----- 1 indico www-data 38678 Jun 27 20:12 /opt/indico/cache/assets_global_3.3.3_3267867581.js
root@omeg:~# ls -ld /opt/indico/cache/
drwx--x--- 2 indico root 4096 Jun 27 22:19 /opt/indico/cache/
root@omeg:~# ls -ld /opt/indico/archive/event/46/images/16-png
-rw-r----- 1 indico root 95147 Jun 27 20:08 /opt/indico/archive/event/46/images/16-png
root@omeg:~# ls -ld /opt/indico/archive/event/46/images/
drwxr-x--- 2 indico root 4096 Jun 27 20:08 /opt/indico/archive/event/46/images/
root@omeg:~# ls -ld /opt/indico/archive/event/46/
drwxr-x--- 5 indico root 4096 Jun 27 20:08 /opt/indico/archive/event/46/
root@omeg:~# ls -ld /opt/indico/archive/event/
drwxr-x--- 27 indico root 4096 Jun 27 20:08 /opt/indico/archive/event/
root@omeg:~# ls -ld /opt/indico/archive/
drwx--x--- 3 indico root 4096 Jun 27 20:08 /opt/indico/archive/
root@omeg:~# ls -ld /opt/indico/
drwx--x--- 13 indico www-data 4096 Jun 27 20:18 /opt/indico/
root@omeg:~#

I am a colleague of jihunee17. The error I see when trying downloading an image or a pdf file from our site is

403 Forbidden
nginx/1.24.0 (Ubuntu)

It could be the ngninx permission error as you suspect.

Another problem at our site is the SSL certificate error (the https crossed out error at the top address window) together with “Certificate is not valid.” It seems we forgot securing a certificate. Could this also cause the 403 error?

See if chgrp -R www-data /opt/indico/cache /opt/indico/tmp /opt/indico/archive fixes all your problems. None of those directories (or anything inside) should have the root group - since nginx is of course not a member of that group, it can’t read such files.

No. And I recommend just using certbot (Let’s Encrypt) to get a valid certificate :slight_smile:

Thanks a lot!

The line fix all problems, thanks for your helps again.

I second. Your patience and detailed answers helped us tremendously.