Skip to content

Commit

Permalink
better error message on bad /tmp permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
astrails committed Jun 4, 2009
1 parent dfee195 commit 64d8488
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
4 changes: 2 additions & 2 deletions VERSION.yml
@@ -1,4 +1,4 @@
---
:major: 0
:minor: 1
:patch: 10
:minor: 2
:patch: 0
21 changes: 20 additions & 1 deletion lib/astrails/safe/tmp_file.rb
Expand Up @@ -9,7 +9,26 @@ def self.tmproot
end

def self.cleanup
FileUtils.remove_entry_secure tmproot
begin
FileUtils.remove_entry_secure tmproot
rescue ArgumentError => e
if e.message =~ /parent directory is world writable/
puts <<-ERR
********************************************************************************
It looks like you have wrong permissions on your TEMP directory. The usual
case is when you have world writable TEMP directory withOUT the sticky bit.
Try "chmod +t" on it.
********************************************************************************
ERR
else
raise
end
end
@tmproot = nil
end

Expand Down
20 changes: 10 additions & 10 deletions safe.gemspec
Expand Up @@ -2,11 +2,11 @@

Gem::Specification.new do |s|
s.name = %q{safe}
s.version = "0.1.10"
s.version = "0.2.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Astrails Ltd.", "Mark Mansour"]
s.date = %q{2009-05-27}
s.date = %q{2009-06-04}
s.default_executable = %q{astrails-safe}
s.description = %q{Simple tool to backup databases (MySQL and PostgreSQL) and filesystem locally or to Amazon S3 (with optional encryption)}
s.email = %q{we@astrails.com}
Expand Down Expand Up @@ -59,17 +59,17 @@ Gem::Specification.new do |s|
s.rubygems_version = %q{1.3.1}
s.summary = %q{Backup filesystem and databases (MySQL and PostgreSQL) to Amazon S3 (with encryption)}
s.test_files = [
"examples/example_helper.rb",
"examples/integration/archive_integration_example.rb",
"examples/integration/archive_integration_example.rb",
"examples/example_helper.rb",
"examples/unit/gzip_example.rb",
"examples/unit/s3_example.rb",
"examples/unit/mysqldump_example.rb",
"examples/unit/gpg_example.rb",
"examples/unit/archive_example.rb",
"examples/unit/svndump_example.rb",
"examples/unit/config_example.rb",
"examples/unit/gpg_example.rb",
"examples/unit/gzip_example.rb",
"examples/unit/local_example.rb",
"examples/unit/mysqldump_example.rb",
"examples/unit/pgdump_example.rb",
"examples/unit/s3_example.rb",
"examples/unit/svndump_example.rb"
"examples/unit/pgdump_example.rb"
]

if s.respond_to? :specification_version then
Expand Down

0 comments on commit 64d8488

Please sign in to comment.