-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission issues in shared folder #4120
Comments
Giving the "update" permission unlocks everything ofcourse, but that isn't what we would need... |
Can edit is a combination of create, update, and delete permissions. You shouldn't have that one checked for what you're trying to do. |
Hello. Thanks for your reply. |
Well then you must have all three of create, update, and delete already selected. Deselect update and delete. |
I do exacly that, I just leave "create" selected (and "edit" as it cannot be unselected when "create" is selected), and userB cannot add anything. On the windows client, in the synchronization information, the file I create with userB in the folder shared by userA (with "create" permission given to userB) appears in the error list and is not synchronized (userA doesn't see it in the folder on the web interface for example). |
Now I see, that's a user interface bug. |
Ah okidoki. So it should be solvable ? |
Could you tell me where I should start looking in order to correct this bug ? |
It's somewhere in here: https://github.com/owncloud/core/blob/master/core/js/share.js#L507 |
could https://github.com/owncloud/core/blob/master/core/js/share.js#L104 be related as well ? |
Nope, that's unrelated. |
Well, so far I haven't found anything. |
If you look at the AJAX request to upload.php when you upload the file, it is the same with create or create and update permissions set. |
Yes, the interface is sending the create permissions : 5 properly I think (at least it looks similar to the permissions : 3 that is sent for update 3 = 2+1 for update + read) |
I've had a look in the MySQL database and userB does have permissions : 5 for the given folder in the "oc_share" table. So apparently, the table is correctly updated. This value does change properly when I modify the permissions (adding update for example...) |
I'm lost with your investigation. At this point you should fill out the template, because I don't understand where the problem is anymore: https://github.com/owncloud/core/blob/master/issue_template.md Do you not see the option to upload files in the shared folder or does the upload not work? |
On userB webinterface, I do see the option to upload files in the shared folder, however, the upload does not succeed. (no icon, size of 0, and the file disapears when I reload the page). I've updated the first post according to the template to help you better understand and eventually try to reproduce if you can find the time for it. Thanks a lot for your help |
Sorry, about that. It seems we've both been wasting our time. Can you disable the search_lucene app and retry |
I am not sure what the search_lucene app is, it doesn't appear in my app list. My data directory has 770 permissions. Thanks |
Yes, that's the correct app. I'm not sure what's going on, but something is most likely wrong with your webserver configuration. Waiting for any suggestions from @bartv2. |
OK. So you don't have the same issue on your installation ? |
I've tested it on an other webhosting solution I pay (OVH) and I have the same problem on it aswell... |
@crearaintl Am I correct that userA is named test and userB is named test2? And that uploading with userA to that folder just works? Also the the caching is not related to this problem, the error comes from the garbage collector function |
@bartv2 yes, you are correct on all aspects. |
I though of something and I don't base my reflection on any facts, as I'm not a pro on that kind of maters... Could it be that php way of uploading files creates a an empty file and then fills it with content ? In which case since the "update" permission is turned off, it is unable to put the content inside, resulting to an error... Might be totaly wrong :p |
@MTGap @bartv2 |
According to the PR, this should be fixed already. Please try again with OC 5.0.13 or OC 5 master. Feel free to reopen if it still occurs for you in the recent versions. |
I am having an issue with permissions in shared folders. I have 2 users, userA and userB. With userA I create a folder called "test" which I share with userB with the following permission: “create" but not the other three ("update", "delete" and “share”).
Expected behaviour
I expect userB to be able to add a file in the folder created and shared by userA, both through the web interface and the desktop client.
Actual behaviour
On the web interface, when I add a file with userB to the shared folder, the file appears without any icon and as having a size of 0. If I refresh the page, the file is no longer there.
On userA web interface, the file never appears.
Then I try to sync from the desktop client from userB a file added in the share folder, the client returns an error in the “synchronization information” tab.
Steps to reproduce
Server configuration
Operating system: Linux
Web server: Appach
Database: MySQL
PHP version: 5.3.24
ownCloud version: 5.0.9
Client configuration
Browser: Chrome 28 or Internet Explorer 10 (both totaly up to date)
Operating system: Windows 7 (totaly up to date
Logs
ownCloud log (data/owncloud.log)
Warning PHP Undefined index: mime at /home/content/17/9197417/html/owncloud/apps/files/ajax/mimeicon.php#3 23.07.2013 13:17:23
Warning PHP Undefined index: mime at /home/content/17/9197417/html/owncloud/apps/files/ajax/mimeicon.php#3 23.07.2013 13:00:42
Warning PHP Undefined index: mime at /home/content/17/9197417/html/owncloud/apps/files/ajax/mimeicon.php#3 23.07.2013 13:00:04
Error search_lucene need mimetype for content extraction 23.07.2013 12:59
Warning PHP Undefined index: mime at /home/content/17/9197417/html/owncloud/apps/files/ajax/mimeicon.php#3 23.07.2013 12:57
Warning PHP readdir() expects parameter 1 to be resource, boolean given at /home/content/17/9197417/html/owncloud/lib/cache/file.php#89 23.07.2013 12:57
Warning PHP opendir(/home/content/17/9197417/html/owncloud/data/test2/cache/) [function.opendir]: failed to open dir: No such file or directory at /home/content/17/9197417/html/owncloud/lib/files/storage/local.php#40 23.07.2013 12:57
Warning search_lucene failed to extract meta information for /test/files/Testing: Could not open "/home/content/17/9197417/html/owncloud/data/test/files/Testing" (does not exist, or is not a file) 23.07.2013 12:55
Warning PHP readdir() expects parameter 1 to be resource, boolean given at /home/content/17/9197417/html/owncloud/lib/cache/file.php#89 23.07.2013 12:55
Warning PHP opendir(/home/content/17/9197417/html/owncloud/data/test/cache/) [function.opendir]: failed to open dir: No such file or directory at /home/content/17/9197417/html/owncloud/lib/files/storage/local.php#40 23.07.2013 12:55
Warning PHP mysql_close(): 46 is not a valid MySQL-Link resource at /home/content/17/9197417/html/owncloud/lib/setup.php#284 23.07.2013 12:46
The text was updated successfully, but these errors were encountered: