Skip to content

Reenable file proxy when renaming between mount points - #11167

Merged
MorrisJobke merged 1 commit into
masterfrom
env-movetomountreenableproxy
Sep 22, 2014
Merged

MorrisJobke merged 1 commit into
masterfrom
env-movetomountreenableproxy

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

When moving a folder into another mount point, $renamedFiles is empty
because that goes over a different mechanism.

In such case, this fix makes sure that the file proxy is reenable to
avoid breaking the subsequent files that are being moved.

Fixes #11162

Note: I did not remove the warnings, they are logged as debug anyway.

Please review @schiesbn @LukasReschke @th3fallen

To test, use the steps from #11162 but have at least TWO files inside the folder. One of them will be broken before this fix.

When moving a folder into another mount point, $renamedFiles is empty
because that goes over a different mechanism.

In such case, this fix makes sure that the file proxy is reenable to
avoid breaking the subsequent files that are being moved.
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@PVince81 PVince81 added this to the 2014-sprint-04-current milestone Sep 18, 2014
@ghost

ghost commented Sep 18, 2014

Copy link
Copy Markdown

🚀 Test Passed. 🚀
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org/job/pull-request-analyser/7467/

@MorrisJobke

Copy link
Copy Markdown
Contributor
  • reproduced the steps and the issue on master
  • applied patch
  • both files accessible now from both users

=> 👍

I got following messages in the log during the move of "sub" into "sh":

{"reqId":"541fd4753ee5f","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'sub' !!! \ncache: Array\n(\n    [displayname_owner] => test\n    [path] => sub\n    [uid_owner] => test\n    [permissions] => 31\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1411372149\n    [size] => -1\n    [etag] => 541fd4753dfeb\n    [storage_mtime] => 1411372149\n    [permissions] => 31\n)\n","level":0,"time":"2014-09-22T07:49:09+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"PHP","message":"call_user_func() expects parameter 1 to be a valid callback, class 'OCA\\Gallery\\Thumbnail' not found at \/home\/mjob\/Projekte\/owncloud\/master\/lib\/private\/hook.php#78","level":0,"time":"2014-09-22T07:49:09+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'sub\/ssds2.txt' !!! \ncache: Array\n(\n    [displayname_owner] => test\n    [path] => sub\/ssds2.txt\n    [uid_owner] => test\n    [permissions] => 31\n)\n \ndata: Array\n(\n    [mimetype] => text\/plain\n    [mtime] => 1411372149\n    [size] => 0\n    [etag] => 541fd47599feb\n    [storage_mtime] => 1411372149\n    [permissions] => 31\n    [parent] => 94\n)\n","level":0,"time":"2014-09-22T07:49:09+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_encryption\/keyfiles\/sh\/sub' !!! \ncache: Array\n(\n    [fileid] => 53\n    [storage] => home::test\n    [path] => files_encryption\/keyfiles\/sh\/sub\n    [parent] => 52\n    [name] => sub\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 44\n    [mtime] => 1411371922\n    [storage_mtime] => 1411371922\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 541fd392a185a\n    [permissions] => 31\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1411372150\n    [size] => -1\n    [etag] => 541fd4764d892\n    [storage_mtime] => 1411372150\n    [permissions] => 31\n    [parent] => 52\n)\n","level":0,"time":"2014-09-22T07:49:10+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_encryption\/share-keys\/sh\/sub' !!! \ncache: Array\n(\n    [fileid] => 56\n    [storage] => home::test\n    [path] => files_encryption\/share-keys\/sh\/sub\n    [parent] => 55\n    [name] => sub\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 1024\n    [mtime] => 1411371924\n    [storage_mtime] => 1411371923\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 541fd39450cdd\n    [permissions] => 31\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1411372151\n    [size] => -1\n    [etag] => 541fd4774fd37\n    [storage_mtime] => 1411372151\n    [permissions] => 31\n    [parent] => 55\n)\n","level":0,"time":"2014-09-22T07:49:11+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"Encryption library","message":"can't get path and owner from the file before it was renamed","level":0,"time":"2014-09-22T07:49:13+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"PHP","message":"call_user_func() expects parameter 1 to be a valid callback, class 'OCA\\Gallery\\Thumbnail' not found at \/home\/mjob\/Projekte\/owncloud\/master\/lib\/private\/hook.php#78","level":0,"time":"2014-09-22T07:49:13+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'sub\/ssds.txt' !!! \ncache: Array\n(\n    [displayname_owner] => test\n    [path] => sub\/ssds.txt\n    [uid_owner] => test\n    [permissions] => 31\n)\n \ndata: Array\n(\n    [mimetype] => text\/plain\n    [mtime] => 1411372153\n    [size] => 0\n    [etag] => 541fd4793b362\n    [storage_mtime] => 1411372153\n    [permissions] => 31\n    [parent] => 94\n)\n","level":0,"time":"2014-09-22T07:49:13+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"Encryption library","message":"can't get path and owner from the file before it was renamed","level":0,"time":"2014-09-22T07:49:15+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"PHP","message":"call_user_func() expects parameter 1 to be a valid callback, class 'OCA\\Gallery\\Thumbnail' not found at \/home\/mjob\/Projekte\/owncloud\/master\/lib\/private\/hook.php#78","level":0,"time":"2014-09-22T07:49:15+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"Encryption library","message":"can't get path and owner from the file before it was renamed","level":0,"time":"2014-09-22T07:49:15+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"PHP","message":"call_user_func() expects parameter 1 to be a valid callback, class 'OCA\\Gallery\\Thumbnail' not found at \/home\/mjob\/Projekte\/owncloud\/master\/lib\/private\/hook.php#78","level":0,"time":"2014-09-22T07:49:15+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541fd4753ee5f","app":"Encryption library","message":"can't get path and owner from the file before it was renamed","level":0,"time":"2014-09-22T07:49:16+00:00","method":"POST","url":"\/master\/index.php\/apps\/files\/ajax\/move.php"}

@PVince81

Copy link
Copy Markdown
Contributor Author

@MorrisJobke yes the message "can't get path and owner from the file before it was renamed" is expected... some code is wrongly detecting this situation as a mistake and logging a debug message, but is expected.

@schiessle

Copy link
Copy Markdown
Contributor

looks good 👍

MorrisJobke added a commit that referenced this pull request Sep 22, 2014
Reenable file proxy when renaming between mount points
@MorrisJobke
MorrisJobke merged commit 70937da into master Sep 22, 2014
@MorrisJobke
MorrisJobke deleted the env-movetomountreenableproxy branch September 22, 2014 14:30
@MorrisJobke

Copy link
Copy Markdown
Contributor

Backport as it is a gold ticket stable7 03bb3d2

@karlitschek

Copy link
Copy Markdown
Contributor

Thanks

@schiessle

Copy link
Copy Markdown
Contributor

stable6 was also affected, backport: 3ec5cbb

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[stable7] Suspicious encryption warnings when moving folder to share mount point

6 participants