Error sharing a Shared Folder
Hi! I think this issue is related to 704 on iOS project (don´t know hot to relate this with an issue located on other project) @nasli
After upgrading to 9.0.3.2 there is another problem sharing shared resources.
Steps to reproduce
- i have two users, userOne and userTwo
- userOne shares a folder with full permissions to userTwo
- userTwo tries to create a share link on a file of his shared folder using the web UI
- the 'loading' icon never stops, the link is never created
- in the UI the 'shared link' icon apprears but the link doesn't exists
Expected behaviour
The link of the shared resource should be created
Actual behaviour
- the 'loading' icon never stops, the link is never created
- after refreshing the page (f5) in the UI the 'shared link' icon apprears but the link doesn't exists
Server configuration
Web server: Apache 2.4 Database: MySQL PHP version: 7 OwnCloud: 9.0.3.2 upgraded from 9.0.2.2
Client configuration
Browser: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0
Operating system: Windows 8.1
Logs
ownCloud log (data/owncloud.log)
{"reqId":"sS6ysMKz2\/KHpqweRGG3","remoteAddr":"192.168.1.73","app":"PHP","message":"OCP\\Files\\NotFoundException: at \/var\/www\/owncloud\/apps\/files_sharing\/api\/share20ocs.php#110","level":3,"time":"2016-07-13T07:27:34+00:00","method":"POST","url":"\/owncloud\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?format=json","user":"userTwo"}
https://github.com/owncloud/ios/issues/704 could you check it @mcastroSG ? thanks!
@daorte @nasli unable to reproduce on a server 9.0.3 maybe
It happens to me on a 9.0.3 server upgraded from 9.0.2 in web ui, not tested on mobile clients. In my 9.0.2 i already had the folder share from userOne to userTwo. In the migrated 9.0.3 i try to create the share link as userTwo on the folder shared by userOne.
Maybe try setting "loglevel" to 0 and see if you get more messages in owncloud.log
Is the shared file/folder originally on an external storage ?
Hi @PVince81, the original folder is on external storage, sorry i forgot to mention it. Let me change the log level and see if i can get more info
@daorte please also give us more details about that external storage. The more info the better to be able to reproduce this.
Ok Ok, Let me explain the whole whole picture
1- In filesystem i have a folder with this structure: /home/ubuntu/data_disk1 + data_user_one - 1.tar - 2.tar + data_user_two
The folder is owned by www-data and the group is www-data
2- With the admin account, configure an external storage with this params: - Folder Name: DATA - External Storage: Local - Authentication: None - Configuration: /home/ubuntu/data_disk1 - Available for: userOne (only oserOne can see this mount point) - Enable sharing is selected
3- Log on with userOne, and can see the DATA folder, select it and share with UserTwo with all privileges
4- Log on with userTwo, and can see the DATA folder too (with the shared icon) 5- Navigate to DATA/data_user_one/1.tar 6- Try to create a share link for 1.tar
I did change the log configuration and the message is the same:
{"reqId":"qRm1xQiuJbDHjfP\/g7uX","remoteAddr":"192.168.3.144","app":"PHP","message":"OCP\\Files\\NotFoundException: at \/var\/www\/owncloud\/apps\/files_sharing\/api\/share20ocs.php#110","level":3,"time":"2016-07-14T07:47:56+00:00","method":"POST","url":"\/owncloud\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?format=json","user":"userTwo"}
Hi! any news here?
Just upgraded my test server to 9.0.4 and got the same bahavior.
regards
Server upgraded to 9.1 and still the same issue, i think it could be related to the ownership of the file, because it happens with a shared external storage.
This is the log message in 9.1
{"reqId":"RqfQRSITpd4RUnSoXGf6","remoteAddr":"192.168.3.144","app":"PHP","message":"OCP\\Files\\NotFoundException: at \/var\/www\/owncloud\/apps\/files_sharing\/lib\/API\/Share20OCS.php#123","level":3,"time":"2016-07-26T12:34:49+00:00","method":"POST","url":"\/owncloud\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?format=json","user":"userTwo"}
More information:
I just put some logs on method formatShareon Share20OCS.php and i found something.
When sharing a link on a shared folder, the uid_owner and displayname_owner is the orginal owner of the file/folder, in this case userOne and then, when looking the node over user folder $userFolder = $this->rootFolder->getUserFolder($this->currentUser->getUID()); and sending userTwo as the argument, there is no existent node, i presume because the file/folder owner is userOne and no userTwo, am i right?
If i create a link with userTwo in a regular file/folder (not shared) the the uid_owner and displayname_owner is userTwo and then it can find the nodes correctly.
Also observed here:
Steps to reproduce
- Having a CIFS share mounted at the OS level and then mounted into oC as "local" mount point via the External Storage app
- As LDAP user who received the shared folder, create a new subfolder under the root folder and try to share it via public link
- The public link is not generated and the loading wheel keeps spinning
- Observed with all LDAP users and for every newly created subfolder under the root of the local mount point. Also with different browsers: FF, IE11.
- With 9.0.2 everything was working correctly
Follow-up: this is reproducible with Database users as well and not only LDAP ones
this was working in 9.0.2 - stopped working in 9.0.3
@SergioBertolinSG may I ask you to write an integration test for this?
0. as user 1 mount local folder as 'Local'
1. as user create a folder inside 'Local' named 'foo'
2. as user 1 share 'Local' with user 2
3. as user 2 share 'Local/foo' by link
4. expect a link share to be returned
@daorte @nasli @mcastroSG please help testing https://github.com/owncloud/core/pull/25703
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.