Although quite an old thing in the Linux world (Debian and some others), I am very new to TrueNAS and its concepts. Trying to learn, but I have to say the learning curve feels a bit steep to me. Probably I started much noober than I thought I was ^_^'. Anyways.
Here’s my current issue: I installed Komga as an “App”. After connecting to its “web portal”, naturally I want to click the “Add Library” button. I am able to browse to /mnt but the browser shows an empty folder, whereas the dataset containing my data is actually there, mounted on /mnt/nas. I am able to access it by other means (e.g. shell, Samba shares, etc.), so the dataset really is there. It just does not show at all in Komga’s “Add Library” browser.
I ended up suspecting that it could have something to do with the default user running Komga (id 568) not being able to access filesystems mounted under /mnt, so I edited the Komga App’s settings and changed user and group IDs to a user id and a groupp id I know are allowed to access my data. That seems to be a non-solution, as the app is now stuck at “deploying” status, and I am even unable to reach it using a shell.
So, of course I am doing something wrong here, if not even a lot of things, that is . Question, is: what?
Indeed, I should have mentioned so. My comic-book data is within a subfolder of a dataset mounted on /mnt/nas, e.g. /mnt/nas/share/common/comics
EDIT: My. Only now do I realize that I had already created a thread on this issue, little more than a month ago. The question had no answer at all though. Not sure what to do with that thread.
On Komga install add additional storage:
Type Host Path
Mount Path /mylibrary
Host Path : selected the path to my dataset
After install I was able to select import and import the library successfully and see my files in the app. This is the permission set on the dataset configured by default after setting the default preset to apps:
Step #3 in your above post was crucial: quite unfamiliar with the “container” concepts, I had not thought of adding additional storage, thinking that the installed App would access the host file system. Turns out, it does not. So the /mnt I was seeing empty was /mnt of the container, not the host’s. I am sure this is the 101 for people that are familiar with SCALE, yet… well… I am still learning, eh.
So, a for-dummies solution:
Connect to the web interface
Go to Apps page
In the Application list to the left, select the row of your “Komga” app
Click the Edit button in the upper right corner of the Application info tile to the right
In the Storage Configuration part, click the Add button facing the Additional storage line.
Type: select “Host Path (Path that already exists on the system)”
Mount path: Choose the path under which you want the Komga library browser to find it. Remember: This is a path that will exist only within the Komga container. E.g., /mnt/comics
Host Path: Choose the path under which your comics collection is currently stored on your TrueNAS system. E.g. /mnt/nas/share/comics
Finally, go all the way down and click the Update button. Once the app is restarted, you will be able to add the library within the Komga web portal, browsing to /mnt/comics
Now I can see that this all makes a lot of sense, given that Apps are containers, and containers are not supposed to access their host filesystem that easily.
EDIT: This solution actually unblocked the issues I was encountering on other Apps (Navidrome, SFTPGo, Emby, etc.) that I had installed, scratched my head at, then given up “for now” (for weeks). Thanks a lot again, @ABain!