-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
make it possible to run occ as root #33545
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
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. |
@ChristophWurst I pushed a commit which should resolve this. Also there is no need for a fallback, because if there is no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works. Very nice solution, @susnux 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
53c083e
Compare
/backport to stable31 |
/backport to stable30 |
Wohoooo. Feeling like a community contributor now 😀 |
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