File is deleted when it shouldn't after trying to move a file (from a shared folder) with the same name as one that is already in root
Expected behaviour
The file "photo.JPG" shouldn't be deleted from root and it is been deleted The file "photo.JPG" shouldn't be deleted from folder "A" inside "Shared" folder and it doesn't
Actual behaviour
The file "photo.JPG" is deleted from root when it shouldn't
Steps to reproduce
-
There are two users in the server (user1 and user2)
-
In the server, log in owncloud as user 1
-
Share a folder called "A" with user2.
-
Give him only update permission
-
Log in own cloud as user2
-
Upload in root a file, for instance photo.JPG
-
Now using webdav protocol, try to move a file called "photo.JPG" from a shared folder "A" to root. Notice that you don't have the correct permission so in the end the file isn't going to be moved. We are going to see do it using poster (complement in firefox) (screenshot is attached)
* URL:server/remote.php/webdav/Shared/A/photo.JPG * User: user2 * password: * Action:MOVE * Headers - Destination: server/remote.php/webdav/photo.JPG - Overwrite: T
-
An error 403 is sent
-
In the server, logged as user2 account, refresh the account and then photo.JPG is deleted from root when it shouldn't
Server configuration
Operating system: openSUSE
Database: SQLite 3
ownCloud version: {"installed":"true","version":"5.80.8.1","versionstring":"6.0 pre alpha","edition":""}
Client configuration
Browser: Chrome
Operating system: MaOs 10.7.5
Can you please retest this with alpha 1? THX
Yes, it happens with this version {"installed":"true","version":"6.0.0.0","versionstring":"6.0 alpha 1","edition":""} also
@purigarcia what exactly is the operation - the description is not that clear - is the file move from root to the shared folder or from the shared folder to root?
From Shared to root is failing because of this check as https://github.com/owncloud/core/blob/master/lib/private/connector/sabre/objecttree.php#L90. Behavior is as expected
a Move from root to Shared has issues ....
@purigarcia @rperezb please retest with current git master - THX
Hey @DeepDiver1975 ,
tested with master, stalled":"true","version":"5.0.0.1","versionstring":"6.0 alpha 2","edition":""}
and it´s not working
Steps to reproduce
- There are two users in the server (user1 and user2)
- log in owncloud as USER2, create:
- On the root upload a file and call it: photo.JPG
- Log in as USER1
- Create a folder called A and inside it a file: photo.JPG
- Share the folder called "A" with UPDATE permission with user2.
- Log in as user2
- Now using webdav protocol, move a file called "photo.JPG" from the shared folder "A" to root. Notice that you don't have the right permission so at the end the file isn't going to be moved.
KEY POINT: we select to overwrite the file
We are going to see do it using poster (complement in firefox) (screenshot is attached)
* URL:server/remote.php/webdav/Shared/A/photo.JPG
* User: user2
* password:
* Action:MOVE
* Headers
- Destination: server/remote.php/webdav/photo.JPG
- Overwrite: T
5. An error 403 is sent, expected
6. In the server, logged as user2 account, refresh the account and then photo.JPG is deleted from root when it shouldn't
Can you please test without the Overwrite header? No idea if we support that. THX
I try it, however, on the mobile app, we do support it.
TESTED it: {"installed":"true","version":"5.0.0.1","versionstring":"6.0 alpha 2","edition":""}
OVERWRITE: F
Works fine, the file is not moved, neither deleted.

OVERWRITE: T
It does not work fine, the file on the root is deleted. This affects mobile apps

should be fixed
Tested again using OVERWRITE=T and it's not fixed
Using daily instance (http://daily.owncloud.com/master/owncloud) {"installed":"true","version":"6.90.0.1","versionstring":"7.0 pre alpha","edition":""}
@karlitschek who can take care of this?
@purigarcia are you still seeing this in OC 7.0.3 ?
I check it with the latest version of daily/ stable7 and it's still happening {"installed":"true","version":"7.0.4.2","versionstring":"7.0.4","edition":""}
we should reevaluate this now in master with the new sabredav implementation -> 8.2
Is this still happening with 7.0.7, 8.0.5 or 8.1 ? (8.1 has the new sabredav implementation)
@davitol could you check it? thank you
:+1: Tested in 8.1.1 ("version":"8.1.1.3","versionstring":"8.1.1") and it works fine :white_check_mark: Tested in 8.0.5 ("version":"8.0.5.2","versionstring":"8.0.5") and it works fine :white_check_mark: Tested in 7.0.7 ("version":"7.0.7.2","versionstring":"7.0.7") and it works fine :white_check_mark:
:-1: still happening on stable8.1. I used cadaver to move "/A/test.txt" to "/test.txt" as recipient. Even though I have no move permission for that file, the file "/test.txt" disappeared.
@davitol I guess you probably misread some of the steps.