Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

pyobjects renderer: using octal mode specification for File.* states fails #113

Open
garrickp opened this issue Mar 2, 2015 · 0 comments

Comments

@garrickp
Copy link

garrickp commented Mar 2, 2015

When building a File.managed state, if the mode is specified in octal, the permissions are completely fouled up.

Example:

    File.managed("/etc/apt/apt.conf.d/95vagrant-caching",
             contents='Acquire { Retries "0"; HTTP { Proxy "http://10.0.0.1:8000"; }; };',
             user="root", group="root", mode=0644)

produces:

vagrant@www-vagrant-dev:~$ ls -la /etc/apt/apt.conf.d/95vagrant-caching
-r---w---- 1 root root 72 Feb 26 18:27 /etc/apt/apt.conf.d/95vagrant-caching

The workaround is to specify it in decimal form (i.e. mode=644), or in a string (i.e. mode='0644')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant