Including files in template is resutling in 403

Discussion in 'Programming/Scripts' started by schwim, Mar 19, 2024.

  1. schwim

    schwim Member HowtoForge Supporter

    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):
    Non working files:
    and
    My inspector:

    [​IMG]
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    Check the webspaces access and error log for possible hints of what may causes the issue.
     
  3. Uno

    Uno Member

    It has been a while since the last responses and I hope you have resolved in the meantime. However, since I just had a similar thing happen to me today that took me almost 1 hour, I am posting this here for those who may have the same problem in the future.

    In my case the permissions were fine, as a test I also used
    PHP:
    echo file_exists("/var/www/folder/file.php");
    and the result was true - 1.

    The file was one I had in another php-project-system/linux and I had copy-pasted it. Don't ask me how or why but evidently somehow linux stored the old owner (which is still me) in the file and now it was giving me an error.

    Solution (after going crazy) I copied the text (the php code) from the file, deleted the file and created a new one with the same name, then pasted the text from the old one and now everything works.
     

Share This Page