Users cannot delete folders or files they create
A org I'm associated with we have an OwnCloud instance currently running 7.0.3 on Linux and users have been reporting they cannot delete files or folders they create. The files and folders they are creating are under a shared folder that they are in a group that has access to edit and delete. How can I fix this? The admin logs are not providing any apparent cause.
Just to add I reset the users password and logged in and see this behavior and I used DOM inspector to see the permisions which are set to 23.
Sorry but I can´t reproduce this. We need more information about this and a way to repoduce it. Can you use the issue template please?
Steps to reproduce
- Non admin user creates folder inside folder share to group
- User uploads file
- User cannot delete file he uploaded in folder he created (no trash icon offered)
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
Server configuration
Operating system: Ubuntu Web server: Apache Database: MySQL PHP version:
5.4
ownCloud version: (see ownCloud admin page) 7.0.3 RC3 Updated from an older ownCloud or fresh install: Updated from 7.0.2 List of activated apps: Only the defaults The content of config/config.php:
‘redacted', 'passwordsalt' => ‘redacted', 'datadirectory' => '/home/benker6/files.someorg.org/data', 'dbtype' => 'mysql', 'version' => '7.0.3.2', 'dbname' => ‘someorgoc', 'dbhost' => 'mysql.someorg.org', 'dbtableprefix' => 'oc_', 'dbuser' => ‘someorgocuser', 'dbpassword' => ‘password', 'installed' => true, 'loglevel' => '0', 'forcessl' => false, 'theme' => '', 'maintenance' => false, 'trusted_domains' => array ( 0 => 'files.someorg.org', ), 'mail_from_address' => 'no-reply', 'mail_smtpmode' => 'php', 'mail_domain' => ’someorg.org', ); **Are you using external storage, if yes which one:** local/smb/sftp/… No **Are you using encryption:** yes/no No ### Client configuration **Browser:** Firefox 36.0.1 also tested in latest Safari **Operating system:** ### Logs #### Web server error log Cannot be released #### ownCloud log (data/owncloud.log) parsing the logs the only reference to the folder were having issue with is: {"reqId":"5464962db18fe","app":"OC\Files\Cache\Scanner","message":"!!! No reuse of etag for 'General Board\/Building Access' !!! \ncache: Array\n(\n [displayname_owner] => bkerensa\n [path] => General Board\/Building Access\n [uid_owner] => bkerensa\n [permissions] => 23\n)\n \ndata: Array\n(\n [mimetype] => httpd\/unix-directory\n [mtime] => 1415747915\n [size] => -1\n [etag] => 5464962baf511\n [storage_mtime] => 1415747115\n [permissions] => 23\n [parent] => 25\n)\n","level":0,"time":"2014-11-11T23:05:15+00:00","method":"POST","url":"\/index.php\/apps\/files\/ajax\/newfolder.php"} #### Browser log :)
Permissions 23 is READ (1) + UPDATE (2) + CREATE (4) + SHARE (16). The DELETE (8) permission is missing indeed.
Is the shared folder an external storage mount point ? I see you mentioned not having ext storage but I'm asking to confirm because I believe I have seen this issue in such configs.
CC @schiesbn @icewind1991
@PVince81 I do not think so this is on Dreamhost Shared hosting.
Also although a little of a different issue it seems other are having a similar issue http://forum.owncloud.org/viewtopic.php?f=29&t=24850&p=73767#p73767
Hoping we might have a workaround soon as the non-profit this storage supports is asking for answers and I am hoping they do not try and push us to a proprietary platform like Google Apps :( so a workaround or fix would be awesome.
Also food for thought if this was a where the storage exists issue why can I delete files but users who are not admins cannot?
Ok so oddly I noticed it is only this one folder that users cannot delete from and even I as an admin cannot delete the folder or the files yet when I hover over the folder or the files it shows as shared with all.
Hmm, you could try auto-fixing the permissions by running ./occ files:scan --all as the web server user
I will try this later today... Out of curiousty is there not some sort of permissions sanity check for from when it runs?
There is no on-the-fly permission sanity check... but that command will run the file scanner that should force-adjust the permissions if they are wrong.
This did not resolve the permissions issue
Also when I ran it the text lines were all green and no error messages was anything supposed to show a issue?
I have similar problem. I cant delete files uploaded by users to shared folders with disabled "delete" permission:
Steps to reproduce
- Create folder F by user A (Admin) through browser (Firefox 35). F is owned by A
- Share F to user U with permissions: share no, create yes, update yes, delete no
- on android login to U and upload a file to folder F
- synchronize everytning on PC by A admin
Results: A and U can see a file - OK U can't delete file - OK A can delete file on PC - ERROR no permission to delete, restoring
Nobody can't delete the file! After deleting file through ssh: (translation from polish - original english version can be little different) No permission to delete, restoring; Restoring failed: Error downloading https://domain/remote.php/webdav/Folder/F/DSC_0001.JPG - server replied: Not Found
Operating system: Ubuntu 14.04
Web server: Apache Database: Mariadb PHP version: 5.5.9 ownCloud version: 7.0.4 (stable)
Hello. I have same problem. But maybe this will help you locate the bug: https://drive.google.com/folderview?id=0B_5EtPLrCtQiOFpJaTBmdEtETjg
RFP pub.. is folder shared by owner to group. When I try delete some folders from this shared folder, I cant. Client just resync it with error "Not allowed to remove, restoring" (screen03). But some others, I can delete with no problem.
When I log in to web gui, I see strange thing. When you mouseover trought folder "001 SCH...." you can see the trash icon on right (screen00). But when you go with mouse cursor on folder "Morav..." that delete icon is not there (screen 01). And when I use the check box on folder icon, now there appear banner with option to delete this folder (screen02).
And now, folders which are unable to delete from standard client, are exact same folders, which dont have the "delete" icon when I use mouseover them in web gui.
I hope it will helps...
Owncloud server is 7.0.4 linux, client is last windows or MacOS.
Neto
Not sure if related, but there was a similar permissions issue with the share permission. Could you guys try applying the following patch: https://github.com/owncloud/core/commit/d534f262aaa21773df5a55099e0d95d2d96434e2 (https://github.com/owncloud/core/commit/d534f262aaa21773df5a55099e0d95d2d96434e2.patch)
@PVince81 Your patch fixed my problem. Now, the owner of shared folder can delete files uploaded by others users.
Thank you.
That's good news! That fix will be in 7.0.5.
@bkerensa and @netopier let us know if you have the possibility to test the patch too.
My last backup of my owncloud installation is a month old, and the backup lasted 4 days. I tried to install the patch from my installation directory of owncloud, but it asked me where 2 of the files is that shall be patched. I installed and deinstalled the patch several times and overwrote "/apps/files_sharing/" with the original installation files at the end. All Owncloud Clients now download everything from the beginning from my owncloud server. But I could live with that, but: When everything is downloaded, it doesnt show that it is finished. I shows 100% and 0 seconds left. So on the one hand my data isnt lost, but on the other hand my owncloud installation is damaged and I don't know what to do. I can not install the patch.
@hugoboss2014b you could download the tarball your OC version (7.0.4?) and then copy the folder "file_sharing" back into your install.
How did you apply ? It should be patch -p1 < patchfile.patch inside the owncloud directory. If the patch doesn't apply it means you don't have the right OC version. That patch should apply on 7.0.4.