aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
diff options
context:
space:
mode:
authorDaniele Sluijters <github@daenney.net>2012-10-25 10:06:40 +0200
committerDaniele Sluijters <github@daenney.net>2012-10-29 10:04:59 +0100
commit851f8c10235a0874f5e34b2c7b5544c33f89c022 (patch)
tree5656c3eeb53462bbe65394e3bbe5ec5b380c8a08 /activesupport/CHANGELOG.md
parent81679ab2ae8c9f6a233374efe9fcf096cf9f8fd9 (diff)
downloadrails-851f8c10235a0874f5e34b2c7b5544c33f89c022.tar.gz
rails-851f8c10235a0874f5e34b2c7b5544c33f89c022.tar.bz2
rails-851f8c10235a0874f5e34b2c7b5544c33f89c022.zip
atomicc.rb: Don't assume we may chown/chmod a file.
Previously this code just assumed it is capable of changing the file ownership, both user and group. This will fail in a lot of scenario's unless: * The process is run as a superuser (root); * The owning user and group are already set to the user and group we're trying to chown to; * The user chown'ing only changes the group to another group it is a member of. If either of those conditions are not met the filesystem will simply deny the operation throwing an error. It is also not always possible to do a chmod, there might be a SELinux policy or another limitation preventing the user to change the file mode. To this end the chmod call has also been added to the rescue block. I've also added a little comment above the chmod command that doing a chmod on a file which has an ACL set will cause the ACL to be recalculated / modified.
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r--activesupport/CHANGELOG.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 4b06210c4a..83e763fd77 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -2,6 +2,8 @@
* Implement HashWithIndifferentAccess#replace so key? works correctly. *David Graham*
+* Handle the possible Permission Denied errors atomic.rb might trigger due to its chown and chmod calls. *Daniele Sluijters*
+
* Hash#extract! returns only those keys that present in the receiver.
{:a => 1, :b => 2}.extract!(:a, :x) # => {:a => 1}