-
Notifications
You must be signed in to change notification settings - Fork 7
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
File was not found because wrong user id #110
Comments
So the problem occures if you share a folder via share link and some "unknown" user uploads a PDF-file matching your workflow? Is that correct so far? I think we already use the owner of the file (see https://github.com/R0Wi/workflow_ocr/blob/5aa118e02a37dbd48a7fcc8b97441a98dde0437e/lib/Operation.php#L125) to impersonate when processing the file asynchronously. I just created a folder link and uploaded a PDF file which was processed correctly by the app. So i think we need some more information here. Could you please try to temporarily set your loglevel to |
Yes. I thought the same when i looked for it in the source code. I think it comes from the getUID function that looks for the last modification user but not the real owner. To clarify, i've a folder named '_scans' shared by 'admin_user'. This folder is the main folder where my scanned files are saved. It means whether you're 'user_1' or 'user_2', every scanned files are sent in this shared folder.
I changed usernames for security reasons but this logs is this only one I've got when the process runs |
FYI, I tried to run the process in another folder owned by 'user_1'. It worked like a charm ! |
Thanks for clarification. So we're talking about a folder which is owned by a user and which is "internally" shared to other users, right? So no external (link) share to "anonymous" users and no groupfolders involved? Will try to reproduce this but i think your hint that it could be related to the |
Yes. Exactly. |
Didn't have the time to dig deeper, yet but i'll keep you up to date 👍 |
* Read user id from filepath, don't use fileowner * Use new \OCP\BackgroundJob\QueuedJob base class * Closing #110
* Read user id from filepath, don't use fileowner * Use new \OCP\BackgroundJob\QueuedJob base class * Closing #110
* Read user id from filepath, don't use fileowner * Use new \OCP\BackgroundJob\QueuedJob base class * Closing #110
* Read user id from filepath, don't use fileowner * Use new \OCP\BackgroundJob\QueuedJob base class * Closing #110
@yharroch the user id is now determined by the file path so i think this should be consistent. #116 tackles this issue. It would be great if you could give us some feedback by installing the temporary app artifact from https://github.com/R0Wi/workflow_ocr/suites/6415613489/artifacts/234051766. Please let us now if you need further assistance. Thank's for your help! |
* Read user id from filepath, don't use fileowner * Use new \OCP\BackgroundJob\QueuedJob base class * Closing #110
* Read user id from filepath, don't use fileowner * Use new \OCP\BackgroundJob\QueuedJob base class * Closing #110
* Read user id from filepath, don't use fileowner * Use new \OCP\BackgroundJob\QueuedJob base class * Closing #110
Included in |
Hi there,
thanks a lot for your work. It'll be heaven when I'll be able to scan to PDF with 'fulltextsearch'.
I installed 1.23.2 version on nextcloud 23.0.3 but i have a "Could not process file '/USER_1/files/_SCAN/CCF01042022_0001_OCR.pdf'. File was not found".
I think the problem is that the real owner of the file is another user. The processed file is in a shared folder.
Workflow_ocr look for the current user instead of the owner. The workflow cannot proceed because it look in the wrong data folder. Could you fix this switching 'user' to 'owner' ?
The text was updated successfully, but these errors were encountered: