How about transactional change of ownership.
jbzdak opened this issue · comments
When changing ownership put_file works like that:
- Put the file in proper place
- chmod it
Whis mostly is OK, but sometimes it may hurt --- for example when updating sudoers file, a catually had to execute following command: mv {} /etc/sudoers && chmod 440 /etc/sudoers && chown root:root /etc/sudoers
, because any after mv
and before chown
sudo is essentially unusable --- because it says thay sudoers have bar permissions.
I could patch put, replace file and so on to have following logic:
- Put the file in /tmp/
- Chmod and chown tempfile
- mv it to correct place.
This is better since file has correct permissions all along.
+1
On Tue, Oct 16, 2012 at 6:51 AM, Jacek Bzdak notifications@github.comwrote:
When changing ownership put_file works like that:
- Put the file in proper place
- chmod it
Whis mostly is OK, but sometimes it may hurt --- for example when updating
sudoers file, a catually had to execute following command: mv {}
/etc/sudoers && chmod 440 /etc/sudoers && chown root:root /etc/sudoers,
because any after mv and before chown sudo is essentially unusable ---
because it says thay sudoers have bar permissions.I could patch put, replace file and so on to have following logic:
- Put the file in /tmp/
- Chmod and chown tempfile
- mv it to correct place.
This is better since file has correct permissions all along.
—
Reply to this email directly or view it on GitHubhttps://github.com/heynemann/provy/issues/66.
+1
Will be done this way.