• Misc Help
  • Including files in template is resutling in 403

Hi there everyone,

You can visit this template at https://warcraftian.com

I'm trying to move my template over to my server and I'm having a problem with including the files in the template(css and js). For some reason, it's resulting in a 403 error for both files. I've checked permissions and ownership and they show as correct.

This file system is mounted as a network drive on my computer and I can open these files to edit, they are not corrupt or unreadable. I also loaded the file into the editor, saved it as a copy and tried to load those but those files failed to load as well.

Can someone tell me what I'm getting wrong?

My files:
Working index(to show owner/group/permissions):

web22@system:~/web$ pwd
/var/www/clients/client1/web22/home/schwim_warweb/web
web22@system:~/web$ ls -la
total 80
drwx--x--x 7 web22 client1 4096 Mar 19 09:36 .
drwxr-xr-x 17 root root 4096 Mar 1 21:12 ..
-rw-r--r-- 1 web22 client1 1017 Mar 10 09:28 blizzapitest.php
-rw-r--r-- 1 web22 client1 162 Mar 17 14:01 composer.json
-rw-r--r-- 1 web22 client1 26219 Mar 17 13:51 composer.lock
-rw-rw-r-- 1 web22 client1 1150 Jun 23 2023 favicon.ico
-rw-r--r-- 1 web22 client1 215 Jun 21 2023 .htaccess
drwxr-xr-x 8 web22 client1 4096 Mar 17 15:17 includities
-rw-r--r-- 1 web22 client1 3956 Mar 17 11:47 index.php
drwxr-xr-x 3 web22 client1 4096 Mar 9 2023 lib
-rw-r--r-- 1 web22 client1 31 Mar 9 2023 robots.txt
drwxr-xr-x 2 web22 client1 4096 Mar 19 00:06 stats
drwxr-xr-x 10 web22 client1 4096 Mar 17 13:58 vendor
drwxr-xr-x 6 web22 client1 4096 Mar 10 10:41 ZZZ-unused
web22@system:~/web$

Non working files:

eb22@system:~/web/includities/theme/darkmode$ cd css
web22@system:~/web/includities/theme/darkmode/css$ ls -la
total 1688
drwx------ 2 web22 client1 4096 Dec 22 08:59 .
drwx------ 6 web22 client1 4096 Dec 22 08:59 ..
-rw-rw-r-- 1 web22 client1 392522 Dec 22 08:59 mdb.dark.min.css
-rw-rw-r-- 1 web22 client1 84657 Dec 22 08:59 mdb.dark.min.css.map
-rw-rw-r-- 1 web22 client1 394464 Dec 22 08:59 mdb.dark.rtl.min.css
-rw-rw-r-- 1 web22 client1 377057 Dec 22 08:59 mdb.min.css
-rw-rw-r-- 1 web22 client1 79413 Dec 22 08:59 mdb.min.css.map
-rw-rw-r-- 1 web22 client1 379000 Dec 22 08:59 mdb.rtl.min.css
web22@system:~/web/includities/theme/darkmode/css$

and

web22@system:~/web/includities/theme/darkmode/css$ cd ../js
web22@system:~/web/includities/theme/darkmode/js$ ls -la
total 1304
drwx------ 2 web22 client1 4096 Dec 22 08:59 .
drwx------ 6 web22 client1 4096 Dec 22 08:59 ..
-rw-rw-r-- 1 web22 client1 167907 Dec 22 08:59 mdb.es.min.js
-rw-rw-r-- 1 web22 client1 520668 Dec 22 08:59 mdb.es.min.js.map
-rw-rw-r-- 1 web22 client1 126062 Dec 22 08:59 mdb.umd.min.js
-rw-rw-r-- 1 web22 client1 505049 Dec 22 08:59 mdb.umd.min.js.map
web22@system:~/web/includities/theme/darkmode/js$

My inspector:

    Seeing these directory permissions...

    drwx------ 2 web22 client1 4096 Dec 22 08:59 .
    drwx------ 6 web22 client1 4096 Dec 22 08:59 ..

    ...has me wondering if they should be drwxr-xr-x so that the webserver user has access to them?

    It's hard to tell from your directory listings. When you do the ls -la on the directory /var/www/clients/client1/web22/home/schwim_warweb/web directory, I don't see any css subdirectory.

    The relationship between that directory and the other directory, ~/web/includities/theme/darkmode is not clear because you don't do a PWD in that other dir, but it looks like ~/web/includities/theme/darkmode is a subdirectory of ~/web. You don't show us any html and that inspector window is too small for me to read what's in it.

    But @NogDog appears correct, only user web22 has any permissions at all to read/write/execute any files or directories where these CSS and JS files live. Because your web server has no permission, it probably cannot serve them to a visitor.

      Hi there guys, thanks very much for the help. That was indeed the issue. It seems unzipping onto the mounted file system b0rked the permissions. I ended up unzipping locally and moving the files over which resolved the issue.

        Write a Reply...