PHPackages                             freelock/composer-group-permissions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. freelock/composer-group-permissions

ActiveComposer-plugin[Authentication &amp; Authorization](/categories/authentication)

freelock/composer-group-permissions
===================================

Composer plugin to ensure group write permissions for installed packages

v1.0.0(10mo ago)00MITPHPPHP &gt;=7.4

Since Aug 24Pushed 10mo agoCompare

[ Source](https://github.com/freelock/composer-group-permissions)[ Packagist](https://packagist.org/packages/freelock/composer-group-permissions)[ RSS](/packages/freelock-composer-group-permissions/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Composer Group Permissions Plugin
=================================

[](#composer-group-permissions-plugin)

[![Latest Stable Version](https://camo.githubusercontent.com/eaeb94981ca553a624275a7a6df47faefc9aab4e37764fdf6621df7540f47b9a/68747470733a2f2f706f7365722e707567782e6f72672f667265656c6f636b2f636f6d706f7365722d67726f75702d7065726d697373696f6e732f76)](//packagist.org/packages/freelock/composer-group-permissions)[![License](https://camo.githubusercontent.com/d73d31fc00b7944c87ccaa0069e99e0c89249f962b8160c3a85b27e691b01bea/68747470733a2f2f706f7365722e707567782e6f72672f667265656c6f636b2f636f6d706f7365722d67726f75702d7065726d697373696f6e732f6c6963656e7365)](//packagist.org/packages/freelock/composer-group-permissions)

A Composer plugin that automatically ensures group write permissions for all installed packages by temporarily setting umask to 0002 during install/update operations.

Problem
-------

[](#problem)

When using Composer in shared hosting environments or team development setups, newly created files often lack group write permissions (644 instead of 664), causing permission issues that require manual fixing.

Solution
--------

[](#solution)

This plugin automatically:

- Sets umask to 0002 before `composer install` and `composer update` commands
- Restores the original umask after operations complete
- Ensures all vendor files have group write permissions (664/775)

Installation
------------

[](#installation)

### Global Installation (Recommended)

[](#global-installation-recommended)

Install globally to affect all projects:

```
composer global require freelock/composer-group-permissions
```

### Per-Project Installation

[](#per-project-installation)

```
composer require freelock/composer-group-permissions
```

Usage
-----

[](#usage)

Once installed, the plugin works automatically. You'll see verbose output when running composer with `-v`:

```
composer install -v
# [Group Permissions Plugin] Set umask to 0002 (was 0022)
# ... composer operations ...
# [Group Permissions Plugin] Restored umask to 0022
```

How It Works
------------

[](#how-it-works)

The plugin hooks into Composer's event system:

- `pre-install-cmd` / `pre-update-cmd`: Sets umask to 0002
- `post-install-cmd` / `post-update-cmd`: Restores original umask

This ensures all files created during composer operations have group write permissions without affecting the rest of your system.

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- Composer 2.0 or higher

Use Cases
---------

[](#use-cases)

- **Shared hosting**: Multiple users need write access to vendor files
- **Team development**: Developers sharing code on the same server
- **Deployment scripts**: Ensuring web server can write to vendor directories
- **Docker containers**: Maintaining proper permissions across user boundaries

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Acknowledgments
---------------

[](#acknowledgments)

Created by [Freelock LLC](https://freelock.com) to solve permission issues in shared Drupal and WordPress hosting environments.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance54

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

314d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46937?v=4)[John Locke](/maintainers/freelock)[@freelock](https://github.com/freelock)

---

Top Contributors

[![freelock](https://avatars.githubusercontent.com/u/46937?v=4)](https://github.com/freelock "freelock (1 commits)")

---

Tags

plugincomposerpermissionsgroupumask

### Embed Badge

![Health badge](/badges/freelock-composer-group-permissions/health.svg)

```
[![Health](https://phpackages.com/badges/freelock-composer-group-permissions/health.svg)](https://phpackages.com/packages/freelock-composer-group-permissions)
```

###  Alternatives

[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

601175.5M2.4k](/packages/dealerdirect-phpcodesniffer-composer-installer)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.5M2.8k](/packages/ergebnis-composer-normalize)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

576.1M126](/packages/automattic-jetpack-autoloader)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131240.2k13](/packages/dereuromark-cakephp-tinyauth)[laminas/laminas-component-installer

Composer plugin for injecting modules and configuration providers into application configuration

304.4M108](/packages/laminas-laminas-component-installer)[torann/promise

Simple Roles and Permissions for Laravel 5.

131.1k](/packages/torann-promise)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
