# VERBOSE and "warning: Insecure world writable dir..."

**URL:** <https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900>\
**Category:** Ruby\
**Created:** [November 7, 2006, 11:00am UTC](https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900 "2006-11-07T11:00:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![madiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@madiba](https://www.ruby-forum.com/u/madiba)\
**Post date:** [November 7, 2006, 11:00am UTC](https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900/1 "2006-11-07T11:00:55Z")

</div>

Hello,

I’ve just got very popular – as I guess from google hits – warning  
about insecure dir when I run something like this  
puts %x{bzip2 -9 #{s}}

where s is file to compress.

I found many ‘solutions’ by changing the access to directories to  
satisfy ruby, I don’t want to do this but just turn _this_ warning  
off. I found the answer – setting $VERBOSE to nil works great,  
however I guess it shuts down all warnings.

So how can I turn off this one and only type of warning? And I don’t  
want to mess with my system settings, so please do not discuss this  
subject.

Thanks in advance for help,  
have a nice day  
bye

---

<div class="post-metadata">

**Author:** ![madiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@madiba](https://www.ruby-forum.com/u/madiba)\
**Post date:** [November 7, 2006, 11:01am UTC](https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900/2 "2006-11-07T11:01:25Z")

</div>

On Sat, 4 Nov 2006, Maciej P. wrote:

> off. I found the answer – setting $VERBOSE to nil works great,  
> however I guess it shuts down all warnings.
> 
> So how can I turn off this one and only type of warning? And I don’t  
> want to mess with my system settings, so please do not discuss this  
> subject.
> 
> Thanks in advance for help,  
> have a nice day

$VERBOSE = nil

or

ruby -W0 a.rb

-a

---

<div class="post-metadata">

**Author:** ![madiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@madiba](https://www.ruby-forum.com/u/madiba)\
**Post date:** [November 7, 2006, 11:01am UTC](https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900/3 "2006-11-07T11:01:26Z")

</div>

On Sat, 4 Nov 2006 23:49:51 +0900, removed\_email\_address@domain.invalid wrote:

> > I found the answer – setting $VERBOSE to nil works great

> $VERBOSE = nil

Yes, indeed, I was curious how to set the variable to nil, gee…  
Please, read my question – my problem is I want to turn off only  
specific warnings, not all.

have a nice day  
bye

---

<div class="post-metadata">

**Author:** ![madiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@madiba](https://www.ruby-forum.com/u/madiba)\
**Post date:** [November 7, 2006, 11:01am UTC](https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900/4 "2006-11-07T11:01:29Z")

</div>

Maciej P. wrote:

> I’ve just got very popular – as I guess from google hits – warning  
> about insecure dir when I run something like this  
> puts %x{bzip2 -9 #{s}}  
> where s is file to compress.
> 
> I found many ‘solutions’ by changing the access to directories to  
> satisfy ruby, I don’t want to do this but just turn _this_ warning  
> off. I found the answer – setting $VERBOSE to nil works great,  
> however I guess it shuts down all warnings.

There are also other answers, if you continue Googling. The first page  
of google hits for that phrase includes both a patch to 1.8.5 as well  
as several mentions of changing the $PATH.

---

<div class="post-metadata">

**Author:** ![madiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@madiba](https://www.ruby-forum.com/u/madiba)\
**Post date:** [November 7, 2006, 11:01am UTC](https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900/5 "2006-11-07T11:01:32Z")

</div>

On Sun, 5 Nov 2006, Maciej P. wrote:

> On Sat, 4 Nov 2006 23:49:51 +0900, removed\_email\_address@domain.invalid wrote:
> 
> > > I found the answer – setting $VERBOSE to nil works great
> 
> > $VERBOSE = nil
> 
> Yes, indeed, I was curious how to set the variable to nil, gee…  
> Please, read my question – my problem is I want to turn off only  
> specific warnings, not all.

google is your friend

[http://groups-beta.google.com/group/comp.lang.ruby/browse\_thread/thread/cddd8d3931ba6365/5c2b4ed2c385128d?lnk=gst&q=VERBOSE+world+writable+directory&rnum=1#5c2b4ed2c385128d](http://groups-beta.google.com/group/comp.lang.ruby/browse_thread/thread/cddd8d3931ba6365/5c2b4ed2c385128d?lnk=gst&q=VERBOSE+world+writable+directory&rnum=1#5c2b4ed2c385128d)

[http://groups-beta.google.com/group/comp.lang.ruby/browse\_thread/thread/3c64870ac4241bd7/11da27e099da1100?lnk=gst&q=VERBOSE+world+writable+directory&rnum=2#11da27e099da1100](http://groups-beta.google.com/group/comp.lang.ruby/browse_thread/thread/3c64870ac4241bd7/11da27e099da1100?lnk=gst&q=VERBOSE+world+writable+directory&rnum=2#11da27e099da1100)

included is a patch by eric hodel which does what you desire.

-a

---

<div class="post-metadata">

**Author:** ![madiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@madiba](https://www.ruby-forum.com/u/madiba)\
**Post date:** [November 7, 2006, 11:02am UTC](https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900/6 "2006-11-07T11:02:14Z")

</div>

removed\_email\_address@domain.invalid wrote:

> quietly do  
> what\_you\_were\_doing\_before  
> end

Hmm. Is $VERBOSE thread-local?

David V.

---

<div class="post-metadata">

**Author:** ![madiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@madiba](https://www.ruby-forum.com/u/madiba)\
**Post date:** [November 7, 2006, 11:01am UTC](https://www.ruby-forum.com/t/verbose-and-warning-insecure-world-writable-dir/74900/7 "2006-11-07T11:01:30Z")

</div>

On Sun, 5 Nov 2006, Maciej P. wrote:

> have a nice day  
> then you have the answer

def quietly  
v = $VERBOSE  
$VERBOSE = nil  
yield  
ensure  
$VERBOSE = v  
end

quietly do  
what\_you\_were\_doing\_before  
end

it’s as good as it gets.

-a
