You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
user able to delete shared file when mounted using webdav #2484
USER1 shares somefolder/ containing somefile (created using "New: text file) with USER2, checks "can edit" unchecks "delete".
USER2 maps network drive via webdav and deletes somefile in M:\Shared\somefolder\
somfile is deleted from USER1 interface, is in USER2's trash bin.
Expected behaviour
File should be unshared with USER2
Note, if USER1 shares only the file and USER2 deletes, it correctly results in unsharing the file.
Actual behaviour
File is made unaware to owncloud in USER1's web interface (it is still there on the server but does not show up on web interface). File is now in USER2's trash and USER2 can restore it. I have had SOME luck with the correct behavior when somefile.txt includes the .txt file extension, but this does not guarantee correct behavior.
If USER1 creates a New text file (somefile2) in his root this sometimes results in the deleted file reappearing in somefolder.
SOMETIMES when I've done this somefile.txt COMES BACK on its own after a couple minutes and reappears in the mapped drive of USER2 and in the web interface of USER1. But ~90% of the time it never comes back.
The file is still in the USER1's file directory on the server no matter if it comes back or not.
Steps to reproduce
Create USER1 and and USER2
USER1 creates /somefolder/somefile.txt
USER1 shares /somefolder with USER2. Check "can edit" uncheck "delete"
USER2 uses NetDrive1.3.4.0 and maps drive via webdav https link
USER2 deletes M:\Shared\somefolder\somefile.txt
USER1 web interface shows somefile.txt is gone. Nothing in the Trash.
USER2 sees in web interface the deleted file in trash and can restore it (but for step 8 does not restore it)
USER1 creates New text file in root, somefile2. Looks in somefolder and somefile is back (or not).
Server configuration
Operating system:
Server is on Debian 6.0, Client is on Windows 7 64bit
Web server:
Apache2.2
Database:
MySQL5.1
PHP version:
5.3.3
ownCloud version:
5.0
I thought I had found the problem, but it did not fix this. I had
GRANT ALL PRIVILEGES ON oc-database.* TO 'toplevelocuser'@'localhost' WITH GRANT OPTION;
where it needs to be set ON mysql.* as well to allow access to the mysql db to create users, correct? For now I have it set to ON . I thought I was introducing an additional level of security since I have other db's on mysql. What is the minimal GRANT that needs to be set? BTW, there was never a warning when I installed oc and did the initial setup through the web interface.
I did a complete reinstall of owncloud, DROP oc-database, reinitiallized oc through the web interface and ran through this procedure again but still, USER2 deletes somefile in the shared somefolder in the mapped network drive and USER1 loses contact with the file but it still resides on the server.
One interesting observation is that I see in mysql users that only the initial administrator account created in oc is getting an oc_admin account on mysql, none of the subsequent users I create get an oc_ name in mysql. Is this a change from oc 4.x to 5.0?
UPDATE:
I had defined somefile without the .txt extension. I did a complete reinstall of mysql and owncloud and followed again the above procedure but added the .txt extension to the file. When USER2 deleted somefile.txt, somefolder was no longer shared and all was well. Then, I create somefile WITHOUT the .txt, reshared somefolder with USER2 and now I again see the behavior I described in my original post.
Error files_sharing File source not found for: /somefolder March 21, 2013 13:54
Warning search_lucene failed to extract meta information for /somefolder/somefile: unable to determine file format March 21, 2013 13:54
Warning PHP readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#88 March 21, 2013 13:53
Warning PHP opendir(/srv/oc_data/Dan/cache/): failed to open dir: No such file or directory at /var/www/owncloud/lib/files/storage/local.php#40 March 21, 2013 13:53
Warning search_lucene failed to extract meta information for /somefolder: Could not open "/srv/oc_data/Keith/files/somefolder" (does not exist, or is not a file) March 21, 2013 13:53
Warning search_lucene failed to extract meta information for /somefolder: Could not open "/srv/oc_data/Keith/files/somefolder" (does not exist, or is not a file) March 21, 2013 13:53
Warning PHP readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#88 March 21, 2013 13:53
Warning PHP opendir(/srv/oc_data/Keith/cache/): failed to open dir: No such file or directory at /var/www/owncloud/lib/files/storage/local.php#40 March 21, 2013 13:53
I should add that "Keith" is my USER1, he's the one that shares the folder.
Activity
BernhardPosselt commentedon Mar 21, 2013
@LukasReschke @icewind1991 @MTGap
icewind1991 commentedon Mar 21, 2013
Can't reproduce, after deleting the shared file over webdav it still exists for the original owner and it's correctly unshared
danobrie commentedon Mar 21, 2013
I thought I had found the problem, but it did not fix this. I had
GRANT ALL PRIVILEGES ON oc-database.* TO 'toplevelocuser'@'localhost' WITH GRANT OPTION;
where it needs to be set ON mysql.* as well to allow access to the mysql db to create users, correct? For now I have it set to ON . I thought I was introducing an additional level of security since I have other db's on mysql. What is the minimal GRANT that needs to be set? BTW, there was never a warning when I installed oc and did the initial setup through the web interface.
I did a complete reinstall of owncloud, DROP oc-database, reinitiallized oc through the web interface and ran through this procedure again but still, USER2 deletes somefile in the shared somefolder in the mapped network drive and USER1 loses contact with the file but it still resides on the server.
One interesting observation is that I see in mysql users that only the initial administrator account created in oc is getting an oc_admin account on mysql, none of the subsequent users I create get an oc_ name in mysql. Is this a change from oc 4.x to 5.0?
UPDATE:
I had defined somefile without the .txt extension. I did a complete reinstall of mysql and owncloud and followed again the above procedure but added the .txt extension to the file. When USER2 deleted somefile.txt, somefolder was no longer shared and all was well. Then, I create somefile WITHOUT the .txt, reshared somefolder with USER2 and now I again see the behavior I described in my original post.
danobrie commentedon Mar 21, 2013
Not sure if owncloud's log would help.
Error files_sharing File source not found for: /somefolder March 21, 2013 13:54
Warning search_lucene failed to extract meta information for /somefolder/somefile: unable to determine file format March 21, 2013 13:54
Warning PHP readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#88 March 21, 2013 13:53
Warning PHP opendir(/srv/oc_data/Dan/cache/): failed to open dir: No such file or directory at /var/www/owncloud/lib/files/storage/local.php#40 March 21, 2013 13:53
Warning search_lucene failed to extract meta information for /somefolder: Could not open "/srv/oc_data/Keith/files/somefolder" (does not exist, or is not a file) March 21, 2013 13:53
Warning search_lucene failed to extract meta information for /somefolder: Could not open "/srv/oc_data/Keith/files/somefolder" (does not exist, or is not a file) March 21, 2013 13:53
Warning PHP readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#88 March 21, 2013 13:53
Warning PHP opendir(/srv/oc_data/Keith/cache/): failed to open dir: No such file or directory at /var/www/owncloud/lib/files/storage/local.php#40 March 21, 2013 13:53
I should add that "Keith" is my USER1, he's the one that shares the folder.
MTGap commentedon Apr 7, 2013
The file isn't actually deleted, just removed from the cache. See #2765
Check if operation worked before sending post hooks, fixes #2484