В Птн, 05/02/2016 в 02:44 -0800, John Hicks пишет:
> I've read the file state docs but I can't see a way to check/set the
> ownership and permissions of a non-managed file?
>
>
> For example, we recently had a situation where a binary within a
> software package that should have been owned by root (mode 4750) had
> it's owner changed by mistake as an Ops guy thought all binaries in
> the dir should be owned by the package user. So, I want to add a state
> that will ensure this file is owned by root with the right mode but I
> don't want to push it out from a file source location.
just omit source arg in file.managed.
/tmp/test:
file.managed:
- mode: 4750
user and group defaults to root. at least when minion runs as root
>
>
> Should this be an enhancement to file.exists maybe to assert a file
> exists and has the right permissions, etc?
>
>
> Regards,
> John
> --
> You received this message because you are subscribed to the Google
> Groups "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
salt-users+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.