I have a hand-maintained Bugzilla installation that I'm trying to move to being managed with SaltStack. Currently I have the following .sls file to set up the clone:

    - rev: release-5.0-stable
    - branch: release-5.0-stable
    - target: /srv/http/bugzilla
    - require:
      - pkg: git

My current install has the permissions locked down to basically root:www-data, with owner read-write and group read-only. (IIRC, the Bugzilla install guide said to do this.) I'd like to replicate this configuration with the Salt clone, but can't seem to figure it out. salt.states.git has an option for the user to run the clone as, but nothing about the group (and besides, you can't fiddle with file modes either). It seems like the Right Way™ to do this is to use a salt.states.file state, which requires the git.latest state, but all the file states in the documentation copy stuff from the master, which is not what I want.

How can I set the owner/group/permissions on my new clone?

  • How about creating a state with file.directory specifying name, group, dir_mode, file_mode with recurse: for user, group and mode. – Miuku Jul 23 '18 at 4:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.