Uh oh!
There was an error while loading. Please reload this page.
make it possible to run occ as root - #33545
Conversation
karlitschek
commented
Aug 15, 2022
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ChristophWurst
commented
Sep 18, 2024
Finding the right user is doable from config.php ownership guessing. The tricky part is STDIN/STDOUT/STDERR handling. Neither with shell_exec nor proc_open I was able to connect the parent process pipes with the child process. shell_exec makes the parent block when occ asks for input (e.g. when you make a typo or when it needs confirmation). I've pushed some fixes that make this work on a non-Debian system too. |
susnux
commented
Feb 27, 2025
@ChristophWurst I pushed a commit which should resolve this. Also there is no need for a fallback, because if there is no |
ChristophWurst
left a comment
There was a problem hiding this comment.
Tested and works. Very nice solution, @susnux 👏
nickvergessen
left a comment
There was a problem hiding this comment.
Files belong to my own user. Works fine here with:
- php occ
- sudo php occ
- sudo -u nickvergessen php occ
So sounds good to me
nickvergessen
commented
Feb 27, 2025
I will then squash it and we can merge + backport it, looks straight forward enough :-O |
Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
29180a5 to
53c083eComparenickvergessen
commented
Feb 27, 2025
/backport to stable31 |
nickvergessen
commented
Feb 27, 2025
/backport to stable30 |
karlitschek
commented
Feb 27, 2025
Wohoooo. Feeling like a community contributor now 😀 |
karlitschek
commented
Feb 27, 2025
Ok. Nothing of my code is left. Bit still cool 😎 |
make it possible to run as root
To do
Handle exit codesHandle STDIN/STDOUT/STDERR streams