I'm creating a new RPM using the following command:
fpm --verbose --rpm-use-file-permissions --workdir /apps -s dir -t rpm -n oes-mgt-dev -v 1.0 --iteration 2 /apps/oracle
When I install this RPM it has maintained ownership and modes on all files, but not on any directories. Any ideas of what I can do to make sure ownership and modes are maintained for files and directories?
I'm using FPM version 1.8.1
In case anyone is interested, I found the solution in: https://github.com/jordansissel/fpm/issues/684#issuecomment-116930777
You must have both of these flags to get all the permissions for all files AND directories:
--rpm-auto-add-directories --rpm-use-file-permissions
I have a similar issue but with the --no-rpm-use-file-permissions and --rpm-defattrfile 550 flags. i need the folders created to have the same permissions as the file. above solution does not help.
i am hoping no to specify each folder in the build command
here is my fpm command now
fpm -s dir -t rpm -n appname -v 1.0 --rpm-auto-add-directories --no-rpm-use-file-permissions --rpm-user appname --rpm-group exampleg --rpm-defattrfile 550 ./src/=/local/appname/
Most helpful comment
In case anyone is interested, I found the solution in: https://github.com/jordansissel/fpm/issues/684#issuecomment-116930777
You must have both of these flags to get all the permissions for all files AND directories:
--rpm-auto-add-directories --rpm-use-file-permissions