Hello guys, i trying to get proxmox + nextcloud container (from Turnkey image) to host my nextcloud files on USB hard drive.
Let's begin:
1. I create a user id, a group id with value 2000 and add the new user to new group on pve host.
2. I do the samething on nextcloud container, so user id and group id will match.
3. I create a mount in
After reboot, at this point i already have the mount from USB External Hard Drive in pve host.
To mount the previous mount on container, i edited /etc/pve/lxc/XXXX.conf and added:
So, in my container, i will have the new mount.
On files
Without this mapping, the mount folder in container will have read only access.
After i restart my container, i can create files in mount folder, so i have write access,
The problem it's with Nextcloud configuration, i changed
I try to open NextCloud in browser and i get this error message:
This is my permissions at folder. How i can solve this problem?
I think is the way the container create mount. I have to remove the other users permissions in folder to this works!
Let's begin:
1. I create a user id, a group id with value 2000 and add the new user to new group on pve host.
2. I do the samething on nextcloud container, so user id and group id will match.
3. I create a mount in
/etc/fstab
from my usb external drive (NTFS format) to a folder on my pve host.UUID="XXXXXXXXXX" /mnt/nextcloud/ ntfs nls-utf8,umask-0222,uid-2000,gid-2000,rw 0 0
After reboot, at this point i already have the mount from USB External Hard Drive in pve host.
To mount the previous mount on container, i edited /etc/pve/lxc/XXXX.conf and added:
Code:
mp0: /mnt/nextcloud,mp=/mnt/nextcloud
lxc.idmap = u 0 100000 2000
lxc.idmap = g 0 100000 2000
lxc.idmap = u 2000 2000 1
lxc.idmap = g 2000 2000 1
lxc.idmap = u 2001 102001 63535
lxc.idmap = g 2001 102001 63535
On files
/etc/subuid
and /etc/subgid
i added this line:root:2000:1
Without this mapping, the mount folder in container will have read only access.
After i restart my container, i can create files in mount folder, so i have write access,
The problem it's with Nextcloud configuration, i changed
/var/www/nextcloud/config/config.php
to edit datadirectory to /mnt/nextcloud/data and run the command to copy nextcloud installation files to my folder cp -rp /var/www/nextcloud/data /mnt/nextcloud/
I try to open NextCloud in browser and i get this error message:
Code:
Error
Your data directory is readable by other users
Please change the permissions to 0770 so that the directory cannot be listed by other users.
This is my permissions at folder. How i can solve this problem?
I think is the way the container create mount. I have to remove the other users permissions in folder to this works!
Code:
root@nextcloud ~# ls -l /mnt/nextcloud/data/
total 108
drwxrwxrwx 1 nobody nogroup 0 Apr 30 2020 admin
drwxrwxrwx 1 nobody nogroup 0 Jan 20 17:28 appdata_446b5fb8e2a4b
drwxrwxrwx 1 nobody nogroup 0 Jan 20 03:10 appdata_oculads50ykc
-rwxrwxrwx 1 nobody nogroup 0 Jan 20 17:37 index.html
-rwxrwxrwx 1 nobody nogroup 108371 Jan 21 18:01 nextcloud.log
Last edited: