rr- / szurubooru

Image board engine, Danbooru-style.
GNU General Public License v3.0
664 stars 175 forks source link

"Wrong ownership" / "config.yaml should be a file not a directory" when "docker-compose up" inside a veracrypt container under windows 10 #620

Open SpaghettiMonkey opened 7 months ago

SpaghettiMonkey commented 7 months ago

I'm working on windows 10 and I have put my szuru directory on some usb storage device. It works pretty good with the database that was created at the location it's at currently (if I remember correctly). I think I moved the installation at some point but I'm not sure (going to et more importance later) Now what I'm trying to do is move the whole thing on a veracrypt encrypted container. I tried with relative paths for data and sql at first, as the drive letters the veracrypt container will be mounted on can change, but it replied "'config.yaml' should be a file, not a directory, skipping" and accessing the website with my browser, I end up with an empty booru (0 posts, no users data...). I then tried with drive letters just to see if this worked at least, but it doesn't bring me any further. At the time I'm writing this, I'm testing having mounted the veracrypt container before launching the docker daemon / desktop app, but I think I tested both this scenario and the "reverse" case scenario, and if I remember correctly there was not much difference in results. Although at some point it gave me a message (from postgres I think) saying something like "wrong ownership, you should start the database with the owner who created it" or something. That's where the whole installation location thing becomes important, maybe. Is this the cause of all of this ? Do you guys have a solution ?

SpaghettiMonkey commented 7 months ago

here's the log :

[+] Building 0.0s (0/0)                                                                                  docker:default
[+] Running 4/4
 ✔ Network szurubooru-25_default     Created                                                                       0.3s
 ✔ Container szurubooru-25-sql-1     Created                                                                       0.4s
 ✔ Container szurubooru-25-server-1  Created                                                                       0.9s
 ✔ Container szurubooru-25-client-1  Created                                                                       0.8s
Attaching to szurubooru-25-client-1, szurubooru-25-server-1, szurubooru-25-sql-1
szurubooru-25-sql-1     | chmod: /var/lib/postgresql/data: Operation not permitted
szurubooru-25-sql-1     |
szurubooru-25-sql-1     | PostgreSQL Database directory appears to contain a database; Skipping initialization
szurubooru-25-sql-1     |
szurubooru-25-sql-1     | 2023-12-06 22:23:30.096 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
szurubooru-25-sql-1     | 2023-12-06 22:23:30.096 UTC [1] HINT:  The server must be started by the user that owns the data directory.
szurubooru-25-sql-1 exited with code 0
szurubooru-25-sql-1     | chmod: /var/lib/postgresql/data: Operation not permitted
szurubooru-25-sql-1     |
szurubooru-25-sql-1     | PostgreSQL Database directory appears to contain a database; Skipping initialization
szurubooru-25-sql-1     |
szurubooru-25-sql-1     | 2023-12-06 22:23:54.792 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
szurubooru-25-sql-1     | 2023-12-06 22:23:54.792 UTC [1] HINT:  The server must be started by the user that owns the data directory.
SpaghettiMonkey commented 7 months ago

inb4 I already checked it wasn't "read only" in windows folder properties, I'm the one that posted this issue earlier.

SpaghettiMonkey commented 1 month ago

Now I've tested this on yet another disk, works fine, but still doesn't work with veracrypt.