BenoitAnastay / paperless-home-assistant-addon

Paperless Home Assistant Addon
MIT License
31 stars 6 forks source link

media and consume directory not found when mounted as nfs #96

Closed mopahle closed 4 months ago

mopahle commented 4 months ago

I created a nfs network share with name "paperless" and usage "share". When starting paperless-ngx addon i see the following error message in the logs:

?: PAPERLESS_CONSUMPTION_DIR is set but doesn't exist.
    HINT: Create a directory at /share/paperless/consume
?: PAPERLESS_MEDIA_ROOT is set but doesn't exist.
    HINT: Create a directory at /share/paperless/media

the metioned folders do exist on the host. When I remove the network share, the addon starts without any issues.

BenoitAnastay commented 4 months ago

When you mount the storage can you explore it from Home Assistant OS ?

It's generally ACL issue on your remote host, whan you can try is to disable the ACL so paperless will have unrestricted access to the share

mopahle commented 4 months ago

When you mount the storage can you explore it from Home Assistant OS ?

Yes, I can explore it via ssh and can create files in the nfs share.

It's generally ACL issue on your remote host, whan you can try is to disable the ACL so paperless will have unrestricted access to the share

How can I disable the ACL?

BenoitAnastay commented 4 months ago

How can I disable the ACL?

I don't known it on your storage server

You can also use docker exec into the add-on container to check if there's any error.

Look at your network share logs also you may have some clues

mopahle commented 4 months ago

docker exec into the container helps me to solve the issue now: Inside the container the /share/paperless directory has no privileges. I changed this with chmod 0777 /share/paperless inside the container (on the host the privileges were already at 0777) and now the addon starts normally. I have no clue about the root cause. Thanks for pointing me into the right direction.

BenoitAnastay commented 4 months ago

Thanks you, I'll add a chown command to the init script as an attempt to fix this issue