-
Notifications
You must be signed in to change notification settings - Fork 45
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
PHP-App can't create subdirs and read own, created files: the origin problem changed #110
Comments
The user would be |
Thanks. Never mind. I've installations of the CMS in my_webapp, my_webapp__2, my_webapp__3. In everyone of these it doesn't work. Should be the user not be "my_webapp___x" based on the app installation? Add: "check its ID from the webadin." ??? |
That's what I was implying. The user should be The user does have write access to its I have just tried running a simple php script from the command line, that writes a new file, and it works. :/ |
... a miracle ;-) |
Shameless copy-paste from: https://linuxhint.com/write-file-php/ Create a new php file
Run it either by opening it in the browser or by running the command line: Test both ways and delete |
Will do it (later). Thanks! |
Uuups ... ;-)
Seems to be another trouble. Tried php 8.0 and 7.4, pasted the code exactly.
inside ==>
A member of the WBCE CMS forum asked me, if there is a problem with hidden directories (?) |
So, I created based on above/linuxhint.com/write-file-php this one:
Worked on the hidden directory. Seems to be a problem on CMS-side. ;-) Thanks for your support until now! |
So, the origin problem changed ;-), look: In communication with the WBCE developer I tried debugging the code on this behaviour. Nothing to see, but. I created two exactly same installations: Yunohost: oejv-bayern.freiesachen.de and on Hetzner Webspace: nwi.mvtool.de (Apache!) The same file on nwi.mvtool.de: https://nwi.mvtool.de/media/.news_img/test02.jpg Conclusion: Thoughts about wrong file writing seems to be not correct. Could be a nginx-thing: files written by scripts maybe run in this error. Files written via SFTP in may_webapp__x are okay. So, is it a nginx-configuration of Yunohost or the sub-parts in my_webapp ??? |
News: The problem seems to be narrowed down: within my_webapp access to a hidden directory generates a 403 error. That's a configuration thing inside nginx. Where: Yunohost global or my_webapp additions? |
Found the "issue" in case of my system WBCE: my_webapp blocks hidden fiels and folders. I found this in the app-nginx config (/etc/conf.d/domain.tld.d/my_webapp[__x].conf)
What's the reason for this decision? |
Great investigation! :) Pinging @YunoHost-Apps/apps-group for more insights, but I guess it's because hidden files are meant to be... hidden. 😛 You want to circumvent that, either configure the CMS to rely on a non-dotted directory, or change the block you quoted with:
|
The original commit doesn't say much about this: 1e98b92 But I could see one motivation, which is that people could be tempted to Dunno if that's a good enough motivation but that's my 2 cents ;P |
Thanks for your comments! I talked to the developer of the CMS WBCE and the specific module has its reason using a hidden folder. And Yunohost/my_webapps has its own reasons. Crashing motivations ;-). |
Check out the hooks system from our documentation. A hook script can be triggered whenever your webapp is upgraded so that its nginx conf file is always set to your liking. |
How to post a meaningful bug report
Describe the bug
Trying using the WBCE CMS. Installing works. But a module needs to write files and creates own subdirs. File writung is okay, creating subdirs not. And: Reading the files gives a 403 forbidden nginx error.
Context
Steps to reproduce
Expected behavior
All files written by SFTP are okay, only problems on files and subdirs (tried) written by the CMS.hown/chmod was checked, everything is my_webapp__X:www-data and/or 0644/755.
Logs
;-( PHP-Log shows no error, when it happens.
Short: Which is the user running PHP inside my_webapp? Where are modifications to make, the PHP-Srcrpts are allowed creating subdirs and so on?
The text was updated successfully, but these errors were encountered: