-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Context :-
Hi. I Am Trying To Install Nextcloud Standalone On My Stock Android Phone For Testing Purposes, Using Termux Linux Environment App, And uDocker, A Container Execution Software, Which Doesn't Require Root. I Have Tried Non-Docker, Tarball Extraction At Web Root Based Installation, Which Worked After Some Hiccups, But It Wasn't Maintainable Due To Constant Upgrades Of PHP, Breaking The Setup. So This Approach Feels Suitable For Stable Setup.
Issue :-
Here, I Am Facing An Issue With Apache Not Having Proper Permission To Access /var/log/apache2/error.log . This Is The Error I Got In STDOUT :-
AH00091: apache2: could not open error log file /var/log/apache2/error.log. AH00015: Unable to open logs
Suspicion 1 :-
When I Tried To Investigate This, The error.log File Exists, But With crwxr--r-- Permission. Meaning, It Was Accessible As Character/Device File. Even Nano Said It's A Device File 😂.
Even If It's Content Is Funneled To /dev/null Or Something Similar (Since File Visible As Character/Device File), I Can Actually Read And Access The /dev/zero , /dev/null , /dev/random And /dev/urandom Paths. So That Shouldn't Be The Problem.
Suspicion 2 :-
When I Looked Up This Error On Internet, A Lot Of People Claimed, By Correctly Setting The SELinux Context Or Permission To The File, Solved The Problem. This Fix Is Not Possible For Me To Do, Since uDocker Does Not Have Support For Executing Commands Inside Container, Unlike Docker's exec Command.
As I Am Writing This, I Have An Idea. Maybe If I Mounted The Log Path Outside The Container To Host, That Might Solve The Problem. But IDK.
Let Me Test And Let You Know.
Workaround :-
Update :- Replicating The Same Files From /var/log/apache2/ From The Inside Of The Container, To Host Side, chmoding Their Permission To 777, And Bind Mounting Their Parent Folders To Each Other, Solved This Problem.