issue 245 (RPM's with non-root owners doesn't set ownership of directori... #260

merged 1 commit into from Nov 8, 2012


None yet
4 participants

ajf8 commented Sep 11, 2012


I've added a --directories argument to FPM which causes the values to be added as %dir entries under the file list, so they take the --rpm-user and --rpm-group as owners and get removed when the RPM gets removed. As you can see, it works just like --config-files.

What do you think?

Thanks and Regards,

@ajf8 ajf8 issue 245 (RPM's with non-root owners doesn't set ownership of direct…
…ories). Add a --directories argument, which in a similar way to --config-files allows directories to be tagged as directories, meaning they are owned by the RPM. This means they get the --rpm-user and --rpm-group as their owners, and they are removed with the RPM.

Hi, this sounds good, as it solves our problem of ensuring that our directories are getting created with the right users/groups- thanks!

Could it be taken further? It would be FANTASTICALLY-USEFUL if there were a way of defining per file/directory permissions within the resultant RPM (which is possible when using a spec file). I don't know what would be the best way of assigning the permissions?

  1. A simple list file - lists the files/directories and their permissions (bit like a spec)
  2. A switch that copies the source owner, group and permissions (and perhap SELinux contexts) and add them to the spec file/ resultant RPM. like this idea sounds like a simple concept, much like preserving permissions in a copy or archive.
  3. A convention for defining the owner, group, mode etc,, within the filename which then get stripped off again.



Patch works great for me, I'd love to see it merged.


jordansissel commented Nov 8, 2012


jordansissel merged commit 4b6d3b3 into jordansissel:master Nov 8, 2012

1 check passed

default The Travis build passed

jordansissel commented Nov 8, 2012

@davidmccormick - Definitely interested in such a feature, can you file a separate issue about it? We can discuss behavior/interfaces there. :)

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