[GH-ISSUE #572] User does not have a home folder #446

Closed
opened 2026-02-25 21:31:56 +03:00 by kerem · 5 comments
Owner

Originally created by @thndrbck on GitHub (Jan 4, 2024).
Original GitHub issue: https://github.com/ciur/papermerge/issues/572

Originally assigned to: @ciur on GitHub.

In case you experience issues with docker image provided by linuxserver.io/papermerge, please open bug report in their repository.

Description
After creating a new user, logging out the admin user, and trying to log in as the newly created user, get a screen with only this message: User does not have home folder
Using the docker-compose file in the 3.0 documentation to run papermerge

Expected
Expected a return to the log in screen so that I could log in as the newly created user

Actual
No login screen. Just the above message

Info:

  • OS: Ubuntu 22.04 LTS with docker
  • Browser Chrome running on Linuxmint
  • Database SQLite
  • Papermerge Version 3.0 stable
    pmbizDockerLog.txt
    Screenshot from 2024-01-03 16-07-18
Originally created by @thndrbck on GitHub (Jan 4, 2024). Original GitHub issue: https://github.com/ciur/papermerge/issues/572 Originally assigned to: @ciur on GitHub. **In case you experience issues with docker image provided by [linuxserver.io/papermerge, please open bug report in their repository.](https://github.com/linuxserver/docker-papermerge/issues)** **Description** After creating a new user, logging out the admin user, and trying to log in as the newly created user, get a screen with only this message: User does not have home folder Using the docker-compose file in the 3.0 documentation to run papermerge **Expected** Expected a return to the log in screen so that I could log in as the newly created user **Actual** No login screen. Just the above message **Info:** - OS: Ubuntu 22.04 LTS with docker - Browser Chrome running on Linuxmint - Database SQLite - Papermerge Version 3.0 stable [pmbizDockerLog.txt](https://github.com/ciur/papermerge/files/13834507/pmbizDockerLog.txt) ![Screenshot from 2024-01-03 16-07-18](https://github.com/ciur/papermerge/assets/16791618/09395003-6a7c-49ae-908d-b6c13f9971a1)
kerem 2026-02-25 21:31:56 +03:00
Author
Owner

@cezarasurdoiu commented on GitHub (Jan 4, 2024):

Hello!
I've also encountered the same issue. As a workaround, I've tried to update the home_folder_id by performing a PATCH request on the specified endpoint (api/users/user_id), but without success. I've tried to change any other field (e.g. username, email) and it has worked, but for home_folder_id it still assigns null.

<!-- gh-comment-id:1877667950 --> @cezarasurdoiu commented on GitHub (Jan 4, 2024): Hello! I've also encountered the same issue. As a workaround, I've tried to update the home_folder_id by performing a PATCH request on the specified endpoint (api/users/user_id), but without success. I've tried to change any other field (e.g. username, email) and it has worked, but for home_folder_id it still assigns null.
Author
Owner

@ciur commented on GitHub (Jan 4, 2024):

@thndrbck, @cezarasurdoiu thank you for reporting this issue. This is definitely a bug.

The bug is there because this line of code was not invoked upon user creation

Did you create new user via web UI ?

Until fix is available, here is the workaround:

While Papermerge instance is up and running , you need to enter into web app's docker container.
For that:

$ docker ps

CONTAINER ID   IMAGE                       COMMAND                  CREATED        STATUS         PORTS                                     NAMES
8b74e4fac42f   pcore-web                   "/run.bash server"       14 hours ago   Up 6 minutes   0.0.0.0:11000->80/tcp, :::11000->80/tcp   pcore-web-1
4e59703425f8   pcore-worker                "/run.bash worker"       14 hours ago   Up 6 minutes   80/tcp                                    pcore-worker-1
d2d745d1428c   redis:6                     "docker-entrypoint.s…"   3 days ago     Up 6 minutes   6379/tcp                                  pcore-redis-1
e9bfa7258ac2   bitnami/postgresql:16.1.0   "/opt/bitnami/script…"   3 days ago     Up 6 minutes   5432/tcp                                  pcore-db-1

In example above, web app container is 8b74e4fac42f.

Then:

$ docker exec -it 8b74e4fac42f /bin/bash

While in container, activate app's virtual environment (without changing current folder, which by default is /core_app):

$ source ./venv/bin/activate

Then enter into Django's shell:

$ ./manage.py shell

In django shell run following commands (let's say user without home folder has username john):

1. from papermerge.core.models import User
2. user = User.objects.get(username='john')
3. user.create_special_folders()
4. user.save()

At this point your user should have both home folder and inbox folder; you can double check that with (while in Django's shell):

1. user.home_folder
2. user.inbox_folder

Both statements should return valid home/inbox folder with UUIDs

<!-- gh-comment-id:1877722305 --> @ciur commented on GitHub (Jan 4, 2024): @thndrbck, @cezarasurdoiu thank you for reporting this issue. This is definitely a bug. The bug is there because [this line of code](https://github.com/papermerge/papermerge-core/blob/e1e8ea107430bf2a0b13359dd6f0bff818145936/papermerge/core/signals.py#L175) was not invoked upon user creation Did you create new user via web UI ? Until fix is available, here is the workaround: While Papermerge instance is up and running , you need to enter into web app's docker container. For that: ``` $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8b74e4fac42f pcore-web "/run.bash server" 14 hours ago Up 6 minutes 0.0.0.0:11000->80/tcp, :::11000->80/tcp pcore-web-1 4e59703425f8 pcore-worker "/run.bash worker" 14 hours ago Up 6 minutes 80/tcp pcore-worker-1 d2d745d1428c redis:6 "docker-entrypoint.s…" 3 days ago Up 6 minutes 6379/tcp pcore-redis-1 e9bfa7258ac2 bitnami/postgresql:16.1.0 "/opt/bitnami/script…" 3 days ago Up 6 minutes 5432/tcp pcore-db-1 ``` In example above, web app container is ``8b74e4fac42f``. Then: ``` $ docker exec -it 8b74e4fac42f /bin/bash ``` While in container, activate app's virtual environment (without changing current folder, which by default is `/core_app`): ``` $ source ./venv/bin/activate ``` Then enter into Django's shell: ``` $ ./manage.py shell ``` In django shell run following commands (let's say user without home folder has username `john`): ``` 1. from papermerge.core.models import User 2. user = User.objects.get(username='john') 3. user.create_special_folders() 4. user.save() ``` At this point your user should have both home folder and inbox folder; you can double check that with (while in Django's shell): ``` 1. user.home_folder 2. user.inbox_folder ``` Both statements should return valid home/inbox folder with UUIDs
Author
Owner

@cezarasurdoiu commented on GitHub (Jan 5, 2024):

Hello, @ciur ! Yes, in my case, the new user was created via web UI. Thank you for the detailed workaround, it worked for me. Now, the login with a new user works as expected!

<!-- gh-comment-id:1878413097 --> @cezarasurdoiu commented on GitHub (Jan 5, 2024): Hello, @ciur ! Yes, in my case, the new user was created via web UI. Thank you for the detailed workaround, it worked for me. Now, the login with a new user works as expected!
Author
Owner

@ciur commented on GitHub (Jan 13, 2024):

I cannot reproduce the problem locally, but intuitively I think where the problem may be.

This PR should fix the problem. The change is about creating users/inbox/home in one DB transaction.

The fix will be available in 3.0.1 release.

<!-- gh-comment-id:1890355198 --> @ciur commented on GitHub (Jan 13, 2024): I cannot reproduce the problem locally, but intuitively I think where the problem may be. This [PR](https://github.com/papermerge/papermerge-core/pull/301) should fix the problem. The change is about creating users/inbox/home in one DB transaction. The fix will be available in 3.0.1 release.
Author
Owner

@thndrbck commented on GitHub (Jan 16, 2024):

I'll test it again with version 3.01

On Sat, Jan 13, 2024, 2:17 AM Eugen Ciur @.***> wrote:

I cannot reproduce the problem locally, but intuitively I think where the
problem may be.

This PR https://github.com/papermerge/papermerge-core/pull/301 should
fix the problem. The change is about creating users/inbox/home in one DB
transaction.

The fix will be available in 3.0.1 release.


Reply to this email directly, view it on GitHub
https://github.com/ciur/papermerge/issues/572#issuecomment-1890355198,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEADQQR3THWGP35JLN3XUGDYOIYKFAVCNFSM6AAAAABBNMT74KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQGM2TKMJZHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:1893114669 --> @thndrbck commented on GitHub (Jan 16, 2024): I'll test it again with version 3.01 On Sat, Jan 13, 2024, 2:17 AM Eugen Ciur ***@***.***> wrote: > I cannot reproduce the problem locally, but intuitively I think where the > problem may be. > > This PR <https://github.com/papermerge/papermerge-core/pull/301> should > fix the problem. The change is about creating users/inbox/home in one DB > transaction. > > The fix will be available in 3.0.1 release. > > — > Reply to this email directly, view it on GitHub > <https://github.com/ciur/papermerge/issues/572#issuecomment-1890355198>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AEADQQR3THWGP35JLN3XUGDYOIYKFAVCNFSM6AAAAABBNMT74KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQGM2TKMJZHA> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#446
No description provided.