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

feat(permissions): add option to make file generated in docker shell … #2556

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

considine
Copy link

Description

Allows you to specify that all files generated in the docker-shell with user laradock should be group writable, i.e. 775 instead of 755

Just update this flag in .env to true:

WORKSPACE_GROUP_WRITABLE=true

Motivation and Context

Multiple users may be using a Laradock installation workspace. You can already specify a group id in the .env file, i.e.

WORKSPACE_PGID=1002

But files created in the workspace will only be readable by the group. For example if you run

php artisan make:controller MyController

from a Laravel project, the file generated on the host won't be writable by all members of that group, and saving the file from a code editor will fail

Types of Changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Definition of Done Checklist:

  • I've read the Contribution Guide.
  • I've updated the documentation. (refer to this for how to do so).
  • I enjoyed my time contributing and making developer's life easier :)

@considine
Copy link
Author

Note: there is no section in the documentation about permissions in general, or existing permission configurations like the env variable:

WORKSPACE_PGID=1002

So it updating the docs did not seem to apply. Let me know if this is not the case

@Mahmoudz Mahmoudz force-pushed the master branch 15 times, most recently from 1e6e8c0 to 89c9cfe Compare September 30, 2020 20:30

RUN if [ ${GROUP_WRITABLE} = true ]; then \
echo "# Make Group Writable" >> ~/.bashrc && \
echo "umask 002;" >> ~/.bashrc && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the semicolon is not necessary

@Mahmoudz Mahmoudz force-pushed the master branch 26 times, most recently from 5503249 to 9707cb4 Compare August 13, 2021 16:05
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.

None yet

2 participants