Factorio - Permissions Not Allowing Mods to be Initiated

OS Name/Version: Ubuntu 20.04.4 LTS x86_64

Product Name/Version: AMP Release “Triton” v2.3.2.8, built 28/03/2022 15:21

Problem Description: Factorio instance is not recognizing mods due to an permissions error during initilization:

Error ModManager.cpp:163: writeModlist threw an exception: filesystem error: create_directories "/mods" failed: Permission denied [/mods]

Steps to reproduce:

Error is reproduced whenever default.zip save is deleted and server performs first-time setup for a new save. The permission error is not thrown when loading a previously established save, but the mods are not being recognized either.

Actions taken to resolve so far:

Double checked file tree to ensure mods are in correct location.
Double checked a proper mod-list.json is present, with desired mods, and in correct location.

How did you add the mod files?

Downloaded from mods.factorio.com and uploaded through SFTP.

Using AMPs built in SFTP? Or your system SFTP? If the latter - what user did you log in as?

Same user as I logged into panel with, used the SFTP address provided by AMP.

I think you’ve got something wrong in a configuration somewhere, it looks like it’s trying to write to /mods which would be in the root of your file system. It should probably ./mods or mods/.

I figured it out, had a mod dependency I didn’t know about.

After I figured that out, I created a fresh instance and the mods worked completely normally.

Thank you for the prompt replies earlier.