-
Notifications
You must be signed in to change notification settings - Fork 17
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 access trigger not working #92
Comments
did you check the flow.log in data dir? |
It seems that flow.log is not be filled by workflow_script. There is not one entry by this app. |
ah, i think the loglevel should be set to 1 for this. |
Ok, now flow.log is receiving information about the workflow stuff. {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:20+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"Flow activation: rules were requested","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"scopes":[{"scope":"admin"},{"scope":"user","uid":"user@domain.com"}],"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"Flow activation: rules were requested"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"No flow configurations is going to run","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"No flow configurations is going to run"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"Flow activation: rules were requested","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"scopes":[{"scope":"admin"},{"scope":"user","uid":"user@domain.com"}],"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"Flow activation: rules were requested"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"No flow configurations is going to run","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"No flow configurations is going to run"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"Flow activation: rules were requested","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"scopes":[{"scope":"admin"},{"scope":"user","uid":"user@domain.com"}],"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"Flow activation: rules were requested"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"No flow configurations is going to run","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"No flow configurations is going to run"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"Flow activation: rules were requested","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"scopes":[{"scope":"admin"},{"scope":"user","uid":"user@domain.com"}],"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"Flow activation: rules were requested"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"No flow configurations is going to run","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"No flow configurations is going to run"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"Flow activation: rules were requested","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"scopes":[{"scope":"admin"},{"scope":"user","uid":"user@domain.com"}],"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"Flow activation: rules were requested"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"No flow configurations is going to run","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"No flow configurations is going to run"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"Flow activation: rules were requested","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"scopes":[{"scope":"admin"},{"scope":"user","uid":"user@domain.com"}],"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"Flow activation: rules were requested"}} {"reqId":"cmhhdn8YHuzIbow0blxG","level":0,"time":"2021-05-26T18:20:21+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"GET","url":"/apps/files_texteditor/ajax/loadfile?filename=1377.txt&dir=%2F","message":"No flow configurations is going to run","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"operation":{"class":"OCA\FilesAccessControl\Operation","name":"Zugriff auf Datei verhindern"},"message":"No flow configurations is going to run"}} |
As a counterpart, here are the logs from saving a change to a file: {"reqId":"VdUlQDZRF0n5LrYRBpg7","level":1,"time":"2021-05-26T18:17:02+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"PUT","url":"/apps/files_texteditor/ajax/savefile","message":"All qualified flow configurations are going to run","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"entity":{"class":"OCA\WorkflowEngine\Entity\File","name":"Datei"},"operation":{"class":"OCA\WorkflowScript\Operation","name":"Run script"},"configuration":[{"id":"8","class":"OCA\WorkflowScript\Operation","name":"","checks":"[10]","operation":"/nc-config/lock-file %i %a %e","entity":"OCA\WorkflowEngine\Entity\File","events":"["\\OCP\\Files::postTouch","\\OCP\\Files::postWrite"]","scope_type":"0","scope_actor_id":""}],"message":"All qualified flow configurations are going to run"}} {"reqId":"VdUlQDZRF0n5LrYRBpg7","level":1,"time":"2021-05-26T18:17:02+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"PUT","url":"/apps/files_texteditor/ajax/savefile","message":"Flow handling for event done","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"operation":{"class":"OCA\WorkflowScript\Operation","name":"Run script"},"entity":{"class":"OCA\WorkflowEngine\Entity\File","name":"Datei"},"eventName":"\OCP\Files::postWrite","message":"Flow handling for event done"}} {"reqId":"VdUlQDZRF0n5LrYRBpg7","level":1,"time":"2021-05-26T18:17:02+00:00","remoteAddr":"x.x.x.x","user":"user@domain.com","app":"workflowengine","method":"PUT","url":"/apps/files_texteditor/ajax/savefile","message":"Flow handling for event done","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.1","data":{"operation":{"class":"OCA\WorkflowScript\Operation","name":"Run script"},"entity":{"class":"OCA\WorkflowEngine\Entity\File","name":"Datei"},"eventName":"\OCP\Files::postWrite","message":"Flow handling for event done"}} |
Any updates on this? Having the same problem... |
Steps to reproduce
Expected behaviour
The file should contain a line with the file operation file id and the user name.
Actual behaviour
There are nothing happened.
No log entries. Appears on NC 20 and NC 21
Trigger with file create, change, delete and rename are working fine.
Workflow Script app
Workflow Script app version: 1.5.1 & 1.6.0
Server configuration
Operating system:
Ubuntu 20.04.2
Web server:
Apache v2.4.41
Database:
MySQL8 v8.0.23-0ubuntu0.20.04.1
PHP version:
v7.4.16,
Nextcloud version: (see Nextcloud admin page)
20.0.10 & 21.0.2
The text was updated successfully, but these errors were encountered: