cifs mounted directory as data directory does not allow personal data to be stored
Describe the bug
If you designate a Windows shared folder cifs mounted directory as your data directory, your personal data will disappear.
Steps to reproduce
1.Set up a shared folder in Windows.
2.Configure cifs mount in fstab on Ubuntu (Docker Host).
3.Specify the mounted directory as the data directory in compose.yml and compose up.
Expected behavior
If you specify a local directory instead of a mounted directory, you will see a tab for personal data.
Setup
compose.yml
services:
opencloud:
image: opencloudeu/opencloud-rolling:latest
container_name: opencloud
networks:
- vlan
dns:
- 192.168.5.11
entrypoint:
- /bin/sh
command: ["-c", "opencloud init || true; opencloud server"]
environment:
OC_ADD_RUN_SERVICES: ${START_ADDITIONAL_SERVICES}
OC_URL: https://opencloud.my.domain
OC_LOG_LEVEL: info
OC_LOG_COLOR: "false"
OC_LOG_PRETTY: "false"
PROXY_TLS: "false"
OC_INSECURE: "true"
PROXY_ENABLE_BASIC_AUTH: "true"
IDM_ADMIN_PASSWORD: "admin"
IDM_CREATE_DEMO_USERS: "false"
OC_PASSWORD_POLICY_BANNED_PASSWORDS_LIST: banned-password-list.txt
volumes:
- ./config/opencloud/csp.yaml:/etc/opencloud/csp.yaml
- ./config/opencloud/banned-password-list.txt:/etc/opencloud/banned-password-list.txt
- ./config:/etc/opencloud:Z
- ./config/opencloud/apps:/var/lib/opencloud/web/assets/apps:Z
- /mnt/opencloud/data:/var/lib/opencloud:Z
#- ./data:/var/lib/opencloud:Z ## This setting will work properly.
labels:
- "traefik.enable=true"
- "traefik.http.routers.opencloud.entrypoints=websecure"
- "traefik.http.routers.opencloud.rule=Host(`opencloud.my.domain`)"
- "traefik.http.routers.opencloud.service=opencloud"
- "traefik.http.services.opencloud.loadbalancer.server.port=9200"
logging:
driver: local
restart: always
networks:
vlan:
external: true
/etc/fstab
//192.168.5.10/opencloud /mnt/opencloud cifs username=admin,password=admin,file_mode=0777,dir_mode=0777,mfsymlinks,uid=1000,gid=1000 0 0
I have the exact same problem when trying to mount a NFS share into the user open cloud dir. When the NFS share is mountet the "Personal" option on the users screen disappears
OpenCloud needs a least NFS 4.2 with extended attributes support.
Check your logs for failed xattr operations.
OpenCloud needs a least NFS 4.2 with extended attributes support.
Check your logs for failed xattr operations.
I am running NFS v4.2 out of OMV 7.7 My (test) mount options in client /etc/fstab are
192.168.1.104:/nfs_share /var/lib/docker/volumes/opencloud-compose_opencloud-data/_data/storage/users/users/960e5193-7842-4b53-80ad-93f68e569101 nfs4 nofail,bg,hard,noatime,auto,_netdev,bg,timeo=600,retrans=6,retry=6,intr,tcp
THe cotainer log error is 2025-11-10T15:08:26Z INF user idp:"internal" opaque_id:"2d2fbae6-6f01-48ae-aca0-10ccff5a19a2" type:USER_TYPE_PRIMARY authenticated | service=storage-system host.name=73b80188aef6 pkg=rgrpc traceid=6f3401f48e30bb73a8a61f137a854c11 line=github.com/opencloud-eu/reva/[email protected]/internal/grpc/services/authprovider/authprovider.go:146
THe cotainer log error is 2025-11-10T15:08:26Z INF user idp:"internal" opaque_id:"2d2fbae6-6f01-48ae-aca0-10ccff5a19a2" type:USER_TYPE_PRIMARY authenticated | service=storage-system host.name=73b80188aef6 pkg=rgrpc traceid=6f3401f48e30bb73a8a61f137a854c11 line=github.com/opencloud-eu/reva/[email protected]/internal/grpc/services/authprovider/authprovider.go:146
this is just an info log. Does't indicate an error.
THe cotainer log error is 2025-11-10T15:08:26Z INF user idp:"internal" opaque_id:"2d2fbae6-6f01-48ae-aca0-10ccff5a19a2" type:USER_TYPE_PRIMARY authenticated | service=storage-system host.name=73b80188aef6 pkg=rgrpc traceid=6f3401f48e30bb73a8a61f137a854c11 line=github.com/opencloud-eu/reva/[email protected]/internal/grpc/services/authprovider/authprovider.go:146
this is just an info log. Does't indicate an error.
Agree - so why doesn't the NFS drive show up?
Did you mount before the first start of openCloud? Or after?
Did you mount before the first start of openCloud? Or after?
I mountet after I had startet OpenCloud and after I had created the user. I needed the users dir to mount inti som I had to create the user before first mount. It would be easier if the one could select that userdirs was named after username. My users have different nfs shares so I cannot mount a general nfs share for all users data. So I have to mount the individual shares into the individual users OpenCloud users dirs
I mountet after I had startet OpenCloud and after I had created the user. I needed the users dir to mount inti som I had to create the user before first mount.
Maybe we have a misunderstanding. We have one primary storage.
You can mount it to be used as a data directory.
When a user is logged in for the first time, his space will be provisioned. If you mount it later to another volume, you need to copy the existing content, extended attributes, symlinks and hidden files to the new volume.
I mountet after I had startet OpenCloud and after I had created the user. I needed the users dir to mount inti som I had to create the user before first mount.
Maybe we have a misunderstanding. We have one primary storage.
You can mount it to be used as a data directory.
When a user is logged in for the first time, his space will be provisioned. If you mount it later to another volume, you need to copy the existing content, extended attributes, symlinks and hidden files to the new volume.
I did try to copy files from the primary created directory into the new NFS mountet dir. It didn't help. In stead I created a dir "nfs" from within OpenCloud in the original user dir and mountet the nfs drive into that direktory. Now OpensCloud has startet to read the files in the users nfs dir. Now I have to sort user rights and ownership out since OpenCloud is creating files with itself as the owner - not the user.
I did try to copy files from the primary created directory into the new NFS mountet dir. It didn't help.
Did you copy the xattrs also?
I did try to copy files from the primary created directory into the new NFS mountet dir. It didn't help.
Did you copy the xattrs also?
Yes i copied with thwe command:
cp -r --preserve=all <from> <to>
I also copied the hiden files and dirs
I can se that the extended attributes are copied to the files on the new nfs drive, but when i try to issue lsattr on a dir or file it states:
lsattr: Operation not supported While reading flags on .Trash/info