Skip to content

Comments

Update Dockerfile#30

Closed
kn4a-com wants to merge 1 commit intodocker-library:masterfrom
kn4a-com:patch-1
Closed

Update Dockerfile#30
kn4a-com wants to merge 1 commit intodocker-library:masterfrom
kn4a-com:patch-1

Conversation

@kn4a-com
Copy link

Proposal for file change regarding an permission issue with installing new Drupal modules.

Closes #28

Proposal for file change regarding an permission issue with installing new Drupal modules.
@yosifkit
Copy link
Member

The recommended configuration from drupal does not have all the files writable by the www-data user. I think I would rather document how users should make specific directories writable for a short period so that they can install modules or themes. Is it normal to have the themes and modules directories writable by the web server?

@kn4a-com
Copy link
Author

Yeah normally www-data user has write permission for the modules and themes folder. When I was still using shared webhosting they standardly give the webserver write permission to the module folder and themes folder with permission drwxr-x--x (751) just the standard Drupal install from Installatron if am right.

@jrmoserbaltimore
Copy link

You should set up the modules directory as a volume. Ideally, you'll use a docker-compose.yml that brings up drupal:

db:
  image: postgres:9.4
  environment:
    POSTGRES_PASSWORD: "secret"
  expose:
    - "5432"
  volumes:
    - /some/path/drupal/postgres/db:/var/lib/postgresql/data
  restart: always
drupal:
  image: "drupal:8"
  volumes:
    - /some/path/drupal/modules/base:/var/www/html/modules
    - /some/path/drupal/sites/:/var/www/html/sites/
  links:
    - db
  restart: always

Doing it this way allows you to destroy and re-create the container without losing your sites, files, and configurations.

@white-gecko
Copy link

What is about this pull request? Even if one is using @bluefoxicy's approach, the permissions in the Dockerfile will not break it.

@mstenta
Copy link

mstenta commented Sep 30, 2016

The Dockerfile should NOT make the modules and themes folders writable by default. This should be done manually by users who know what they are doing.

Shared web hosting providers do that so that it's possible to download and install new modules and themes directly through the Drupal UI - so that their uses don't need to use FTP or SSH to install extensions. This is nice to have in that environment and for inexperienced users, but it should NOT be a default in this Docker image.

A large production Drupal site will never allow www-data write access to the modules directory, for obvious security reasons.

I suggest we include a simple how-to in the documentation for people who do want this feature, but do not include it in the Dockerfile by default.

@mstenta
Copy link

mstenta commented Sep 30, 2016

Hmm, well it looks like this has already gone in: ee9b578

I don't know if I agree with it... but in either case should we close this PR?

@yosifkit
Copy link
Member

Yup, closing, Fixed by #53.

@yosifkit yosifkit closed this Sep 30, 2016
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

Successfully merging this pull request may close these issues.

5 participants