Repository navigation
Closed
Milestone
Description
Steps to reproduce:
- Enable encryption
- Enable external storage
- Mount SFTP external storage "/sftp" (I tested with global storage, might happen with local as well)
- Assign the storage to the admin user (mine is "root")
- Create two users "user1" and "user2"
- Share "sftp" with "user1"
- Create a subdir "sftp/sub"
- Share "sftp/sub" with "user2"
- Upload a pic "test1.jpg" into "sftp"
- Upload a pic "test2.jpg into "sftp/sub"
- Try downloading "test1.jpg" as "user1"
- Try downloading "test2.jpg" as "user2"
Expected result
Files can be downloaded
Actual result
Cannot download
Logs
{"reqId":"4aa24a8cd0ac04d65a386fb9a662ecd1","remoteAddr":"127.0.0.1","app":"index","message":"Exception: {\"Message\":\"Encryption key not found for \\\"\\\/user2\\\/files\\\/sub\\\/P1050922.JPG\\\" during attempted read via stream\",\"Code\":0,\"Trace\":\"#0 [internal function]: OCA\\\\Files_Encryption\\\\Stream->stream_read(8192)\\n#1 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/files\\\/view.php(283): fread(Resource id #475, 8192)\\n#2 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/files\\\/filesystem.php(606): OC\\\\Files\\\\View->readfile('\\\/sub\\\/P1050922.J...')\\n#3 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/files.php(155): OC\\\\Files\\\\Filesystem::readfile('\\\/sub\\\/P1050922.J...')\\n#4 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/apps\\\/files\\\/ajax\\\/download.php(37): OC_Files::get('\\\/sub', Array, false)\\n#5 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/route\\\/route.php(135) : runtime-created function(1): require_once('\\\/srv\\\/www\\\/htdocs...')\\n#6 [internal function]: __lambda_func(Array)\\n#7 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(250): call_user_func('\\\\x00lambda_3', Array)\\n#8 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/base.php(782): OC\\\\Route\\\\Router->match('\\\/apps\\\/files\\\/aja...')\\n#9 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/index.php(36): OC::handleRequest()\\n#10 {main}\",\"File\":\"\\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/apps\\\/files_encryption\\\/lib\\\/stream.php\",\"Line\":281}","level":4,"time":"2015-04-15T14:45:45+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/download.php?dir=%2Fsub&files=P1050922.JPG"}
{"reqId":"0c21047f2233303d24a306238708e70a","remoteAddr":"127.0.0.1","app":"index","message":"Exception: {\"Message\":\"Encryption key not found for \\\"\\\/user2\\\/files\\\/sub\\\/P1050922.JPG\\\" during attempted read via stream\",\"Code\":0,\"Trace\":\"#0 [internal function]: OCA\\\\Files_Encryption\\\\Stream->stream_read(8192)\\n#1 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/files\\\/view.php(283): fread(Resource id #475, 8192)\\n#2 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/files\\\/filesystem.php(606): OC\\\\Files\\\\View->readfile('\\\/sub\\\/P1050922.J...')\\n#3 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/files.php(155): OC\\\\Files\\\\Filesystem::readfile('\\\/sub\\\/P1050922.J...')\\n#4 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/apps\\\/files\\\/ajax\\\/download.php(37): OC_Files::get('\\\/sub', Array, false)\\n#5 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/route\\\/route.php(135) : runtime-created function(1): require_once('\\\/srv\\\/www\\\/htdocs...')\\n#6 [internal function]: __lambda_func(Array)\\n#7 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(250): call_user_func('\\\\x00lambda_3', Array)\\n#8 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/lib\\\/base.php(782): OC\\\\Route\\\\Router->match('\\\/apps\\\/files\\\/aja...')\\n#9 \\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/index.php(36): OC::handleRequest()\\n#10 {main}\",\"File\":\"\\\/srv\\\/www\\\/htdocs\\\/owncloud\\\/apps\\\/files_encryption\\\/lib\\\/stream.php\",\"Line\":281}","level":4,"time":"2015-04-15T14:45:46+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/download.php?dir=%2Fsub&files=P1050922.JPG"}
Versions
Observed on stable8 (9dac69b) and also on the enc2_migration branch (#15445).
@schiesbn @th3fallen @DeepDiver1975
Activity
schiessle commentedon Apr 22, 2015
fixed on master