How to acsess omv user homes in nextcloud via local storage bin mounts

  • i am greatful for joining this community,


    all in all its working great:

    OMV running in a VM in proxmox with pass trough HDD (in Raid 5 BTRFS) from the DXP4800 Plus NAS

    Nextcloud 30.0.4 running inside OMV via Docker

    Ordinary omv volume as bind mount as local storage is working


    what i have issues with:

    i tried to make the home directory accessible within nextcloud.

    in nextcloud config yaml:

    - /srv/dev-disk-by-label-data/home:/mnt/omv-home:ro

    in nextcloud:

    as local storage i have configured the entry

    "folder name" $user (i tried {user} too but with same affect)

    "external storage" local

    "Auth" (nothing)

    "Config" /mnt/omv-home/

    "Accessible" all


    symptom:

    when i log in as a certain user all i can see is a folder named "$user" after access i can see a folder named after the user i logged in with but i cannot access it ("Size" pending) "Storage is temporarily not available"

    I use the same credentials in nextcloud as in omv.


    For me its the first time with things like that - up to this point i was a ordinary "ready made" NAS user for years, but with some advanced insides in linux.


    What i am doing wrong? Someone solved a issue like that?


    Thanks in advance

    best

    Sebastian


    NXTcloud-yml.txt

  • votdev

    Approved the thread.
  • Hi

    I found your post searching nextcloud access to user home dir

    Nextcloud is for external access, and i want to use it with omv user home dir. There is no point to have separate locations for nextcloud users to store data.


    Did you find some conf guide for this? Did you solve your problem and how?

    I just started to look for details about the best way how to handle this.

  • In omv users settings I have enabled home dir

    If I want to Nextcloud access this location, do I need to add this location in volumes or environment part of compose file?


    In environment have "NEXTCLOUD_MOUNT" settings, but what if I want more than one mount location?

  • I managed to set it up this way:

    in compose file mount location of user home dir

    Code
    NEXTCLOUD_MOUNT=/srv/dev-xxxxx/your_home_dir_from_omv/

    your_home_dir_from_omv is dir you set on OMV>users>settings

    In NextCloud need to enable external storage and after that in Administration settings >External storage add location of your user dir
    Folder name: for example MyOMVHome, name that will appear in NextCloud
    external storage: local

    Configuration: location of your username dir, like

    Code
    /srv/dev-xxxxx/your_home_dir_from_omv/username

    available for: pick nextcloud user

    your user home dir is owner by username and nextcloud user www-data will not have permissions.

    First i tried with ACL, but with that new files created with NextCloud are owned by www-data and your username will not be able to change that file
    So i created new user group, for example group_name used in the code below , add my username and www-data to that group and change owner of my username dir
    You can create group using OMV web and add your username into that group. But you need to add www-data with:

    Code
    sudo usermod -a -G group_name www-data

    after that fix permissions

    Code
    sudo chown -R username:group_name /srv/dev-diskxxx/your_home_dir_from_omv/username/

    All new files need to inherit the parent dir group ownership

    Code
    sudo chmod g+s /srv/dev-diskxxx/your_home_dir_from_omv/username/

    The group must have write permissions

    Code
    sudo chmod -R 775 /srv/dev-diskxxxx/your_home_dir_from_omv/username/


    After that you can force nextcloud to scan files in external storage with

    Code
    docker exec --user www-data nextcloud-aio-nextcloud php occ files:scan --all


    Hope I did not forget something :)

  • I had ACL active before this try with user group.
    I thought that after creating the user group, I wouldn't need ACL anymore, so I deleted it. After that it didn't work properly again so I just created acl again.

    I guess all this with user www-data and new group need to be done before installing Nextcloud

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!