Closed fgrsnau closed 7 years ago
@schiessle @rullzer
Let me summon @icewind1991
I had the same issue :/
In the past we blocked moving one mount point into another one because this create a lot of problems for re-shares, allow to create share-circles, etc. I think that's still true, right? So what we need to fix here is the check for moving one mount point into another one and block it.
Or did I miss something, @rullzer ?
@schiessle it is not moving the mount point it is moving a subfolder of a mount point.
ah, I see... maybe a permission issue? user 'c' needs to have delete permissions of "da" and create permissions on "db".... I read nothing about the share permissions in this thread that's why I'm asking.
I did not move the mount point itself (“shared folder“ symbol in the root directory) but a subdirectory from one shared folder to another one (as @rullzer said). Interestingly, moving a single file from one share to a different share seems to work.
Permissions are not the problem. Full access was granted for all shares.
I was also able to reproduce this using only two users. User "b" shares two directories "d1" and "d2". User "a" is not able to successfully move a subdirectory of "d1" to a location anywhere in "d2".
You move it via webdav I assume? Or in the webinterface?
Mmmm I'm getting a permission denied (not ideal but at least no data is lost)
Steps I took
a
b
b\c
a
with user1b
with user1a
and b
b\c
to a\c
No, I move the files with the web ui (which seems to issue a MOVE
webdav call).
I perform exactly the same steps as @rullzer described. I don’t get a Permission denied
failure (but the very generic error message "Could not move $DIRECTORY") and the files are moved physically (user1 has full r/w permissions on both shares a
and b
).
Additionally, I think that this operation should not lead to any error and has to be implemented correctly as moving folders between shares is a very common workflow. A workaround is to let user0
move b/c
to d/c
and afterwards d/c
to b/c
where d/
is a "normal" folder owned by user0
.
@fgrsnau I think I was actually hitting https://github.com/nextcloud/server/issues/4327 I'll retest later.
Should be fixed with #4329
I'm not so sure @MorrisJobke. Sice hte bug that is fixes by #4329 was not really present in 11 yet.
Some quick testing suggests that this on is fixed now
I tried with current master branch and moving directories between shares is working! (Note that 983210de2e2798a70d was not working.)
Unfortunately, applying #4329 to the current stable release does not help. It is still not working.
@fgrsnau mmm good to know it is fixed. But not so good that we don't know why. Are you familiar with git? And if so could you do a bisect to find out when we fixed it?
Steps to reproduce
Expected behaviour
The directory should visible in db.
Actual behaviour
The move fails with an generic error. The underlying files are moved to directory "db". The database query fails and the database is not updated. All files are "visible" in "da" but are inaccessible. An
occ files:scan --all
fixes this.Server configuration
Operating system: Debian Stable
Web server: ngnix
Database: Postgres 9.4
PHP version: PHP 5.6.30-0+deb8u1
Nextcloud version: 11.0.2 (stable)
Updated from an older Nextcloud/ownCloud or fresh install: Any (tested 3 different servers, one of them was freshly installed)
Where did you install Nextcloud from: Website
List of activated apps: Only stock NextCloud.
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP, but reproducible without any external user-backend
NextCloud Logs
I was digging a little bit deeper today. The failure is visible in https://github.com/nextcloud/server/blob/4821c00ea81797fcb5a99c31105ad42be598f113/lib/private/Files/Cache/Cache.php#L515 as sourceStorageId is false. This is, of course, not a valid integer in PostgresSQL and we get this nice error:
ERROR: invalid input syntax for integer: \"\"
I tracked this value back to https://github.com/nextcloud/server/blob/4821c00ea81797fcb5a99c31105ad42be598f113/apps/files_sharing/lib/Cache.php#L81.
Somehow the
$sourceCache
is not populated correctly (the numericId is not set). Currently I do not now how to debug this further.