Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Comments

Create www-data and www-user users and groups with a fixed uid/gid#54

Open
dol wants to merge 1 commit intopuphpet:masterfrom
dol:feature/create-user-fixed-uid-gid
Open

Create www-data and www-user users and groups with a fixed uid/gid#54
dol wants to merge 1 commit intopuphpet:masterfrom
dol:feature/create-user-fixed-uid-gid

Conversation

@dol
Copy link
Contributor

@dol dol commented Apr 30, 2018

This PR allows to predefine the uid/gid of the user www-data and www-user. This fixes a lot of issues like puphpet/puphpet#2757 .

If the uid/gid is fixed the synced_folder option in the puphpet could look like this:

        synced_folder:
            vflsf_wv94qxb0ihgz:
                owner: 2000
                group: 2000
                source: ./
                target: /var/www/mywebproject
                sync_type: default
                ...

The users and group creation can also be overwritten in the config.yaml. E.g.:

server:
    install: '1'
    packages:
        - vim
    groups:
         www-data: 333
         www-user: 444
     users:
         www-data: 333
         www-user: 444

@dol
Copy link
Contributor Author

dol commented Apr 30, 2018

I just found out I could do this with

class puphpet::usersgroups {
. But I need to add the uid/gid param to this class. Not sure which is the best fit for this feature.

Also make sure, that the user/group www-data is always created. Do this by merging the default value into the users/groups hiera data.

@dol
Copy link
Contributor Author

dol commented Apr 30, 2018

Updated PR that the www-data and www-user will be always created.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant