[BUG]: Copy file failed when installing after compilation #1200

Closed
opened 2025-01-18 02:57:34 +00:00 by ConfidantCommunications · 2 comments

What Happened?

After a successful compile to Joomla version 5, I click the button to install the component and there is a copy file error.

Steps to reproduce the Bug

  1. Compile a JCB component project
  2. Click the install button or download the package and upload to the Joomla installer.

Which Joomla version are you compiling in?

The currently installed Joomla! version is "‎5.2.2" ‎5.2.2

Which PHP version are you compiling in?

8.2.23

Which Joomla versions are you targeting?

5

Which PHP version are you targeting?

8.2.23

Which Web server is JCB running on?

Joomla Docker image. Apache 2

Which Relational Database is JCB running on?

mysqlnd 8.2.23

Which OS is JCB running on?

Alpine linux

Which JCB version are you using?

5.0.4 beta 3

Where in JCB did this issue occur?

Installation of a component

On which browsers did you encounter the issue?

Firefox

Additional Comments

No response

### What Happened? After a successful compile to Joomla version 5, I click the button to install the component and there is a copy file error. ### Steps to reproduce the Bug 1. Compile a JCB component project 2. Click the install button or download the package and upload to the Joomla installer. ### Which Joomla version are you compiling in? The currently installed Joomla! version is "‎5.2.2" ‎5.2.2 ### Which PHP version are you compiling in? 8.2.23 ### Which Joomla versions are you targeting? 5 ### Which PHP version are you targeting? 8.2.23 ### Which Web server is JCB running on? Joomla Docker image. Apache 2 ### Which Relational Database is JCB running on? mysqlnd 8.2.23 ### Which OS is JCB running on? Alpine linux ### Which JCB version are you using? 5.0.4 beta 3 ### Where in JCB did this issue occur? Installation of a component ### On which browsers did you encounter the issue? Firefox ### Additional Comments _No response_
ConfidantCommunications added the
Bug
label 2025-01-18 02:57:34 +00:00

I checked the file permission settings and they seem to be okay. 755 for directories, 644 for files.

I checked the file permission settings and they seem to be okay. 755 for directories, 644 for files.

I remember now that I had this trouble in the past. The solution is to change ownership within the docker container.

According to this article https://stackoverflow.com/questions/62390727/docker-chown-doesnt-work-for-www-data-user-permissions-arent-changing the problem is the volume mounting - the volume preserves the permissions from outside the container; it is inheriting the host user's permissions. I did check that and it seemed that the user was properly set to www-data, but I finally did this then it worked:

chown -R www-data: /var/www/html

Before doing that I had to open up a shell within the docker container. First found the hash for it (f7196d83e1e3) using docker container ls -a then started the shell using docker exec -t -i f7196d83e1e3 /bin/bash. Then did the chown function and installed the component.

I remember now that I had this trouble in the past. The solution is to change ownership within the docker container. According to this article https://stackoverflow.com/questions/62390727/docker-chown-doesnt-work-for-www-data-user-permissions-arent-changing the problem is the volume mounting - the volume preserves the permissions from outside the container; it is inheriting the host user's permissions. I did check that and it seemed that the user was properly set to www-data, but I finally did this then it worked: 
chown -R www-data: /var/www/html Before doing that I had to open up a shell within the docker container. First found the hash for it (f7196d83e1e3) using docker container ls -a then started the shell using docker exec -t -i f7196d83e1e3 /bin/bash. Then did the chown function and installed the component.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1200
No description provided.