saltyorg / Sandbox

Saltbox Sandbox
GNU General Public License v3.0
68 stars 94 forks source link

Trouble with "Local Storage" in Wikijs role #186

Closed RaneyDazed closed 1 year ago

RaneyDazed commented 1 year ago

What PR?

PR #150

What is the issue?

There is an issue of some sort with the way things are mapped to the container. I had some trouble with this when I set it up via docker compose. When you set the local storage to /data (without the trailing slash as requested on the page) it allows the change with no errors.

However, when you try to use the local storage, it produces "No Permission" errors. Another example of it failing to work correctly is if you go to settings/utilities/Export To Disk/Export to tarball / file system and run a backup task, with /data/.export (default if local storage set to /data) set as the directory/file, it completes like it ran the task but nothing is placed in /opt/wikijs/app/data/.


IIRC, the reason for this had to do with the "working directory" variable/env. I can't seem to find my compose that had that in it, but if I can I'll gladly link it here. It seems that it is currently set to /wiki. You can find the current "Workinig Directory." You can find the current working directory under settings/System/Working Directory in the web UI. If its not something you care to support that's fine, I can export by copy and paste if I need to or use git. I just figured that it would be nice to be able to use this particular feature. But it may introduce issues with PG. I'm not sure. I can try messing with the role if you'd like. I made some comments on discord about it, but I was partially wrong. It saves pages and everything just fine in PG. The only issue is when you try to use or export to local storage ie /opt/wikijs/app/{data,config}.

saltydk commented 1 year ago

Not sure what the issue here is? I just installed it and could do export to disk without issue?

saltydk commented 1 year ago
ls /opt/wikijs/app/data/export
groups.json  navigation.json  settings.json  users.json.gz
RaneyDazed commented 1 year ago

Really? 🤔 huh. It wouldn't work for me. I'll delete and reinstall I suppose and see if something odd happened IG

saltydk commented 1 year ago

https://i.imgur.com/nrDY5lC.gif

RaneyDazed commented 1 year ago

Did you add /data as local storage or not touch it at all?

saltydk commented 1 year ago

I just edited the path as you can see in the GIF

saltydk commented 1 year ago

image leads to

root@dev /opt/wikijs/app/data # tree test
test
└── _manual
    └── wiki-20221126-032450.tar.gz

1 directory, 1 file
RaneyDazed commented 1 year ago

It was originally at ./data/export I edited it to the same as you and got this https://imgur.com/a/3RvbI3B

RaneyDazed commented 1 year ago

I'll wipe it clean and try again.

saltydk commented 1 year ago

Must be PEBCAK as I can't reproduce it at least.

RaneyDazed commented 1 year ago

I guess. Idk what else would cause it. :p Running the role rn

RaneyDazed commented 1 year ago

Still not working. This is on my local machine. Could have screwed something up there I suppose. I'll try it w my hetzner before I say anything else then

saltydk commented 1 year ago

You'll have to show what settings you're putting in the various boxes as it could just be what you're doing.

saltydk commented 1 year ago

And did you override any parts of the role?

RaneyDazed commented 1 year ago

No, I didn't add anything to inventory or anything like that. I just now had tried to run the role, made my user, went to export to disk directly without changing anything and it showed it worked fine, but nothing actually sent to disk. Then tried without the . before data and error again. I swear I'm not doing anything weird or changing odd stuff.

saltydk commented 1 year ago

are you removing the opt folder when you're reinstalling?

RaneyDazed commented 1 year ago

Yes. and both containers, image and volume the last time to be sure.

saltydk commented 1 year ago

Well, works fine on my dev box :D

RaneyDazed commented 1 year ago

I guess its something with my home server. 😞 sorry to waste all your time. Worked fine on my hetzner. just removed the . before /data/export and voila. ugh. My bad. Thought I was being helpful. 😓

saltydk commented 1 year ago

Well, at least you can compare the two setups and track down the cause.

RaneyDazed commented 1 year ago

yeah I'll need to see whats happening. Thanks for taking the time salty. I appreciate it!