Issue: User "www-data" lacking permissions to read/write/delete in custom Espo crm extension folders (~/client/custom/modules etc)
-
I have two instances of Espo CRM set up on my Cloudron instance. I am running into an issue with read/write/delete permissions on the extensions folders which are critical for our customizations.
I think the user "www-data" may not have enough permissions to delete files in the following folders:
~/client/custom/modules
~/custom/Espo/Modules
~/data/uploadI have already gone through the documentation and tried the following:
-
Went through these steps:
https://docs.espocrm.com/administration/extensions/#installing -
Then tried these steps from source: https://github.com/espocrm/documentation/blob/master/docs/administration/commands.md#extension
A. Logged in to Cloudron
B. Hover over the EspoCRM square + click the gears icon
C. Up+right - Click on: Terminal
D. Entered the template line (modified as needed for our installation)
bin/command extension --file="path/to/extension/package.zip" -
Tried following this uninstall extensions documentation:
https://docs.cloudron.io/packages/espocrm/#uninstalling-extension
I am still stuck dealing with this error message though:
I believe the documentation does not mention this issue. There is the documentation for uninstalling extensions, but that is for the terminal and not the admin interface.
Does anyone know how to fix this or if it is intentional?
-
-
I have two instances of Espo CRM set up on my Cloudron instance. I am running into an issue with read/write/delete permissions on the extensions folders which are critical for our customizations.
I think the user "www-data" may not have enough permissions to delete files in the following folders:
~/client/custom/modules
~/custom/Espo/Modules
~/data/uploadI have already gone through the documentation and tried the following:
-
Went through these steps:
https://docs.espocrm.com/administration/extensions/#installing -
Then tried these steps from source: https://github.com/espocrm/documentation/blob/master/docs/administration/commands.md#extension
A. Logged in to Cloudron
B. Hover over the EspoCRM square + click the gears icon
C. Up+right - Click on: Terminal
D. Entered the template line (modified as needed for our installation)
bin/command extension --file="path/to/extension/package.zip" -
Tried following this uninstall extensions documentation:
https://docs.cloudron.io/packages/espocrm/#uninstalling-extension
I am still stuck dealing with this error message though:
I believe the documentation does not mention this issue. There is the documentation for uninstalling extensions, but that is for the terminal and not the admin interface.
Does anyone know how to fix this or if it is intentional?
@cdejongfiero As you found out when files are added to the app's filesystem, the permissions can become different depending on how the files were added.
When uploading a file via the File Manager, the permissions are "guessed" based on the permissions of the files around it. This is correct most of the time , but can be wrong especially for apps that run with multiple user ids.
When running commands via Web Terminal, the files are created as "root". The default permissions of the Web Terminal is root - again because apps can have multiple user ids and root can be any user id.
For this reason: after you run a command, run chown -R www-data:www-data on the necessary files. Alternately, run the command with "gosu www-data php command.php ..." (this runs as user www-data).
Finally, I am not sure about the "Permission denied to delete files" . Is there a verbose mode for that command to figure what it is not able to delete?
-