Nextcloud Update fails with error - Operation not permitted:

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.17
What app is this about: Nextcloud

Describe your issue

I tried to update Nextcloud from 31.0.7-ynh2 to 31.0.8-ynh1, but got this error:

“WARNING - Failed to update data_dir : Error when changing permissions for /home/yunohost.app/nextcloud: [Errno 1] Operation not permitted: ‘/home/yunohost.app/nextcloud’”

Share relevant logs or error messages

https://paste.yunohost.org/raw/likorutesu

Mokay, have you been maybe tweaking the way /home/yunohost.app is mounted to move it to an external drive or something ?

1 Like

Yes. I mounted it to an external NAS via NFS.

And what are the right “settings” for this folder? Can you show me your getfacl output?

Currently my getfcal output is:

**/home**$     getfacl   /home/yunohost.app/
getfacl: Remove leading '/' of absolute path names
# file: home/yunohost.app/
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

I just followed this tutorial. So this is broken?

I have also mounted with the same --mount bind process. Same getfacl for /home/yunohost/app/

and for home/yunohost.app/nextcloud/

getfacl /home/yunohost.app/nextcloud/
getfacl: Removing leading '/' from absolute path names
# file: home/yunohost.app/nextcloud/
# owner: nextcloud
# group: nextcloud
user::rwx
group::r-x
other::---

ls -lda /home/yunohost.app/nextcloud/
drwxr-x--- 82 nextcloud nextcloud 4096 May 14 20:27 /home/yunohost.app/nextcloud/

I haven’t try yet upgrade nextcloud and hope it will be safe…

Can you post your mount command?

Ok, it’s with LVM partitions and 3 disks on RAID1

 mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime,hidepid=invisible)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=16360116k,nr_inodes=4090029,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=3276276k,mode=755,inode64)
/dev/md1 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=15408)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/dev/mapper/vg-CRYPTPAD on /mnt/pad type ext4 (rw,relatime)
/dev/mapper/vg-APPS on /mnt/apps type ext4 (rw,relatime)
/dev/mapper/vg-data on /mnt/media type ext4 (rw,relatime)
/dev/mapper/vg-CRYPTPAD on /var/www/cryptpad type ext4 (rw,relatime)
/dev/mapper/vg-CRYPTPAD on /var/www/etherpad_mypads type ext4 (rw,relatime)
/dev/mapper/vg-APPS on /home/yunohost.app/mattermost type ext4 (rw,relatime)
/dev/mapper/vg-APPS on /home/yunohost.app/mobilizon type ext4 (rw,relatime)
/dev/mapper/vg-data on /home/yunohost.app/nextcloud type ext4 (rw,relatime)
/dev/mapper/vg-backups on /mnt/backups type ext4 (rw,relatime)
/dev/mapper/vg-mail on /var/mail type ext4 (rw,relatime)
/dev/mapper/vg-backups on /home/yunohost.backup/archives type ext4 (rw,relatime)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/25131 type tmpfs (rw,nosuid,nodev,relatime,size=3276272k,nr_inodes=819068,mode=700,uid=25131,gid=25131,inode64)

cat /etc/fstab
UUID=84123fb9-bde8-41dd-a9fc-afd4fe57b0e6	/	ext4	defaults	0	1
# partition apps mattermost mobilizon
UUID=cc55dbd0-1abc-411a-a7aa-8a4f6d5eaf50	/mnt/apps	ext4	defaults,nofail	  0	0
/mnt/apps/mobilizon         /home/yunohost.app/mobilizon     none       defaults,bind    0     0
/mnt/apps/mattermost        /home/yunohost.app/mattermost    none       defaults,bind    0     0
# partition backups borg__2
UUID=86131a6e-ed0d-4071-aa81-41b50e8d3a50	/mnt/backups	ext4	defaults,nofail	  0	0
/mnt/backups/archives     /home/yunohost.backup/archives        none     defaults,bind    0      0
# partition avec data nextcloud
UUID=4a5b5a94-88ea-4328-a05b-4a3fae339ed2	/mnt/media	ext4	defaults,nofail   0	  0
/mnt/media/nextcloud      /home/yunohost.app/nextcloud        none    defaults,bind    0      0
# partition mails
UUID=d0294479-075c-480b-972e-0131fef47a5d	/var/mail	ext4	defaults	0	1
# partition apps cryptpad et etherpad_mypads libreto
UUID=983ea66d-4732-431a-9d31-86eb85bb9431	/mnt/pad	ext4	defaults,nofail	 0	0
/mnt/pad/cryptpad           /var/www/cryptpad       none       defaults,bind       0      0
/mnt/pad/etherpad_mypads    /var/www/etherpad_mypads   none    defaults,bind       0      0
#/mnt/pad/libreto            /var/www/libreto        none       defaults,bind       0      0  
# partition swap
UUID=7ed24519-ae94-459b-acff-af6b12a72c2a	swap	swap	defaults	0	0
UUID=37dc28a5-c4ab-4260-bd4f-d9006f40cfaa	swap	swap	defaults	0	0
UUID=f0ccd1dd-4592-43ac-85de-ee1c149dd688	swap	swap	defaults	0	0

lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                 8:0    0   1.8T  0 disk  
├─sda1              8:1    0  68.4G  0 part  
│ └─md1             9:1    0  68.3G  0 raid1 /
├─sda2              8:2    0     2G  0 part  [SWAP]
├─sda3              8:3    0   1.8T  0 part  
│ └─md3             9:3    0   1.8T  0 raid1 
│   ├─vg-mail     253:0    0 195.3G  0 lvm   /var/mail
│   ├─vg-data     253:1    0   293G  0 lvm   /home/yunohost.app/nextcloud
│   │                                        /mnt/media
│   ├─vg-CRYPTPAD 253:2    0  97.7G  0 lvm   /var/www/etherpad_mypads
│   │                                        /var/www/cryptpad
│   │                                        /mnt/pad
│   ├─vg-APPS     253:3    0   293G  0 lvm   /home/yunohost.app/mobilizon
│   │                                        /home/yunohost.app/mattermost
│   │                                        /mnt/apps
│   └─vg-backups  253:4    0 913.7G  0 lvm   /home/yunohost.backup/archives
│                                            /mnt/backups
├─sda4              8:4    0     1K  0 part  
└─sda5              8:5    0   1.9M  0 part  
sdb                 8:16   1   1.8T  0 disk  
├─sdb1              8:17   1  68.4G  0 part  
│ └─md1             9:1    0  68.3G  0 raid1 /
├─sdb2              8:18   1     2G  0 part  [SWAP]
└─sdb3              8:19   1   1.8T  0 part  
  └─md3             9:3    0   1.8T  0 raid1 
    ├─vg-mail     253:0    0 195.3G  0 lvm   /var/mail
    ├─vg-data     253:1    0   293G  0 lvm   /home/yunohost.app/nextcloud
    │                                        /mnt/media
    ├─vg-CRYPTPAD 253:2    0  97.7G  0 lvm   /var/www/etherpad_mypads
    │                                        /var/www/cryptpad
    │                                        /mnt/pad
    ├─vg-APPS     253:3    0   293G  0 lvm   /home/yunohost.app/mobilizon
    │                                        /home/yunohost.app/mattermost
    │                                        /mnt/apps
    └─vg-backups  253:4    0 913.7G  0 lvm   /home/yunohost.backup/archives
                                             /mnt/backups
sdc                 8:32   0   1.8T  0 disk  
├─sdc1              8:33   0  68.4G  0 part  
│ └─md1             9:1    0  68.3G  0 raid1 /
├─sdc2              8:34   0     2G  0 part  [SWAP]
└─sdc3              8:35   0   1.8T  0 part  
  └─md3             9:3    0   1.8T  0 raid1 
    ├─vg-mail     253:0    0 195.3G  0 lvm   /var/mail
    ├─vg-data     253:1    0   293G  0 lvm   /home/yunohost.app/nextcloud
    │                                        /mnt/media
    ├─vg-CRYPTPAD 253:2    0  97.7G  0 lvm   /var/www/etherpad_mypads
    │                                        /var/www/cryptpad
    │                                        /mnt/pad
    ├─vg-APPS     253:3    0   293G  0 lvm   /home/yunohost.app/mobilizon
    │                                        /home/yunohost.app/mattermost
    │                                        /mnt/apps
    └─vg-backups  253:4    0 913.7G  0 lvm   /home/yunohost.backup/archives
                                             /mnt/backups