Closed cyberb closed 5 years ago
Is it normal, that I can't access my files in nextcloud anymore after this? Also, I can't create new files. For PDF it says
PDF.js v1.9.426 (build: 2558a58d)
Message: Unexpected server response (503) while retrieving PDF "https://nextcloud.name.syncloud.it/remote.php/webdav/Nextcloud%20Manual.pdf".
Could you send logs to support?
done
Cannot see any nextcloud exception in the log.
Could you post the output for this command:
ls -la /opt/disk/external/nextcloud/
total 96
drwxrwx--- 8 nextcloud nextcloud 4096 Sep 13 06:18 .
drwxr-xr-x 9 root root 4096 Sep 11 19:53 ..
-rw-r--r-- 1 nextcloud nextcloud 324 Aug 30 14:51 .htaccess
-rw-r--r-- 1 nextcloud nextcloud 0 Sep 11 19:48 .ocdata
drwxr-xr-x 7 nextcloud nextcloud 4096 Sep 13 06:18 appdata_oc2nqnjcpo05
drwxr-xr-x 7 nextcloud nextcloud 4096 Aug 30 15:30 appdata_oczo0ea8c1k9
drwxr-xr-x 2 nextcloud nextcloud 4096 Sep 12 15:45 files_external
-rw-r--r-- 1 nextcloud nextcloud 0 Aug 30 14:51 index.html
drwxr-xr-x 3 nextcloud nextcloud 4096 Sep 11 19:43 username2
drwxr-xr-x 3 nextcloud nextcloud 4096 Sep 9 14:55 username1
drwxr-xr-x 2 nextcloud nextcloud 61440 Sep 14 07:13 tmp
Permissions are fine, could you run this:
snap run nextcloud.occ files:scan --all
Starting scan for user 1 out of 4 (username3)
Home storage for user username3 not writable
Make sure you're running the scan command only as the user the web server runs as
Starting scan for user 2 out of 4 (username2)
Home storage for user username2 not writable
Make sure you're running the scan command only as the user the web server runs as
Starting scan for user 3 out of 4 (username1.2)
Starting scan for user 4 out of 4 (username1)
Home storage for user username1 not writable
Make sure you're running the scan command only as the user the web server runs as
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 0 | 0 | 00:00:00 |
+---------+-------+--------------+
I created users in nextcloud, which are not all in LDAP
Should be fine as Nextcloud supporta both ldap and non ldap users. It is strange that scan reported permission problems, could you run more verbose mode:
snap run nextcloud.occ files:scan --all -vvv
Also do you actually have any files in one of your user dirs?
ls -la /data/nextcloud/[user]/files
First command says same as before (no permission).
Second shows there is only /[user]/cache
folder which is empty.
Did you have files before the crash? Is this the same list of users on the filesystem? What this command shows:
ls -la /data
What do you see on internal storage:
ls -la /opt/disk/internal/nextcloud/
Did you activate/deactivate external disk?
/data/nextcloud
contains only user-folders which were created with user-app (LDAP) which are 2 of 4 from the list.lrwxrwxrwx 1 root root 18 Aug 30 14:48 /data -> /opt/disk/external
/opt/disk/internal/nextcloud/
only /platform
folderI see, can you run disk check on your external disk as file system may have been corrupted by the restart/shutdown, you need to find a disk device name:
mount | grep disk
/dev/sdb1 on /opt/disk/external type ext4 (rw,nosuid,relatime,data=ordered)
In my case it is /dev/sdb1, the check disk command is then:
fsck /dev/sdb1
It says:
mount | grep disk
/dev/sda1 on /opt/disk/external type ext4 (rw,nosuid,relatime,stripe=8191,data=ordered)
fsck /dev/sda1
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
/dev/sda1 is mounted.
e2fsck: Cannot continue, aborting.
Right, could you deactivate it settings?
Yes, but still can't create new files. I could also re-install nextcloud, I don't have any important data on it. I'm just trying to help to find the bug to allow a complete recovering.
Could it have also changed the rights? As suggested here https://docs.nextcloud.com/server/13/admin_manual/maintenance/manual_upgrade.html?highlight=manual%20upgrade With
chown -R www-data:www-data nextcloud
find nextcloud/ -type d -exec chmod 750 {} \;
find nextcloud/ -type f -exec chmod 640 {} \;
Anyway, by running this, I crashed it and just re-installed nextcloud. So I will not be able to make further tests...
Syncloud uses nextcloud user instead of www-data, let's close this for now and reopen if happens again.
We should implement an automatic recover of appdata dir in case it is corrupted. Recovery command is this:
Need to find oit how to detect corruption state, probably occ has some options for that.
To reproduce remove js dir from appdata, for example:
See this issue for more details: https://github.com/syncloud/platform/issues/418