Skip to content
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

sedrNJrZ1 (Permission denied) #60

Open
muhme opened this issue Apr 24, 2024 · 2 comments
Open

sedrNJrZ1 (Permission denied) #60

muhme opened this issue Apr 24, 2024 · 2 comments

Comments

@muhme
Copy link

muhme commented Apr 24, 2024

Executing ./run.sh errors in

...
webserver-web-1           | Setting up Joomla
webserver-web-1           | sed: couldn't open temporary file /var/www/html/j4/sedrNJrZ1: Permission denied
webserver-web-1           | sed: couldn't open temporary file /var/www/html/j4/sedNzOj73: Permission denied
webserver-web-1           | sed: couldn't open temporary file /var/www/html/j4/sedFQOli8: Permission denied
webserver-web-1           | sed: couldn't open temporary file /var/www/html/j4/sedPsLdZc: Permission denied
webserver-web-1           | sed: couldn't open temporary file /var/www/html/j4/sedacZ6jj: Permission denied
webserver-web-1           | Installing Joomla with mysql
webserver-web-1           | sed: couldn't open temporary file /var/www/html/j4/sedje3ZJn: Permission denied
webserver-web-1           | Waiting for database server
...
@muhme
Copy link
Author

muhme commented Apr 24, 2024

Analyze shows the temporary files are in docker container web-1, in directories under /var/www/html:

root@4c25ce5c93f7:/var/www/html#  ls -l /var/www/html/j4
...
-rw-r--r--   1 docker docker    764 Apr 23 13:14 robots.txt.dist
-rw-r--r--   1 docker docker  25917 Apr 23 13:14 ruleset.xml
-?????????   ? ?      ?           ?            ? sedFQOli8
-?????????   ? ?      ?           ?            ? sedNzOj73
-?????????   ? ?      ?           ?            ? sedPsLdZc
-?????????   ? ?      ?           ?            ? sedacZ6jj
-?????????   ? ?      ?           ?            ? sedje3ZJn
-?????????   ? ?      ?           ?            ? sedrNJrZ1
...

The temporary files are created by the script install-joomla.sh with sed -i in-place substitutes. This could be reproduced by running sed -i inside the container. It is worth to note that this happens on Intel macOS.

Googling shows that the used sed version 4.7 creates a tmp file without any permissions in Docker. This should be fixed in 4.8.

I would create a PR with sedsubstitute in a separate tmp file.

muhme added a commit to muhme/DPDocker that referenced this issue Apr 24, 2024
Workaround for Digital-Peak#60.
Replaces eight times sed in-place editing for configuration.php by writing to the tmp file `configuration.tmp` and then moving it.
@laoneo
Copy link
Member

laoneo commented Apr 24, 2024

Thanks for the investigation. If you can create a pr, would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants