[ruby-core:36228] [Ruby 1.9 - Bug #4712][Open] File.writable? inaccurate in windows

1 view
Skip to first unread message

Roger Pack

unread,
May 16, 2011, 1:04:06 PM5/16/11
to ruby...@ruby-lang.org

Issue #4712 has been reported by Roger Pack.

----------------------------------------
Bug #4712: File.writable? inaccurate in windows
http://redmine.ruby-lang.org/issues/4712

Author: Roger Pack
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.2p180 (2011-02-18) [i386-mingw32]


Hello. Here's what happens (when a user doesn't have admin privileges in windows 7):

c:\Program Files (x86)\NetBeans 6.9.1>irb --simple-prompt
>> File.writable?('.')
=> true
>> File.writable?('./uninstall.exe')
=> true
>> File.open('./uninstall.exe', 'wb')
Errno::EACCES: Permission denied - ./uninstall.exe
from (irb):4:in `initialize'
from (irb):4:in `open'
from (irb):4

So I think writable was returning true in error here.
Cheers!
-r


--
http://redmine.ruby-lang.org

U.Nakamura

unread,
May 16, 2011, 9:23:39 PM5/16/11
to ruby...@ruby-lang.org
Hello,

In message "[ruby-core:36228] [Ruby 1.9 - Bug #4712][Open] File.writable? inaccurate in windows"


on May.17,2011 02:04:06, <rogerp...@gmail.com> wrote:
> >> File.open('./uninstall.exe', 'wb')
> Errno::EACCES: Permission denied - ./uninstall.exe
> from (irb):4:in `initialize'
> from (irb):4:in `open'
> from (irb):4

Please show us the result of attrib and cacls.


Regards,
--
U.Nakamura <u...@garbagecollect.jp>


Roger Pack

unread,
May 17, 2011, 1:21:44 PM5/17/11
to ruby...@ruby-lang.org

Issue #4712 has been updated by Roger Pack.

c:\Program Files (x86)\NetBeans 6.9.1>attrib uninstall.exe
A C:\Program Files (x86)\NetBeans 6.9.1\uninstall.exe

c:\Program Files (x86)\NetBeans 6.9.1>cacls uninstall.exe
c:\Program Files (x86)\NetBeans 6.9.1\uninstall.exe NT AUTHORITY\SYSTEM:(ID)F
BUILTIN\Administrators:(ID)F
BUILTIN\Users:(ID)R


----------------------------------------
Bug #4712: File.writable? inaccurate in windows
http://redmine.ruby-lang.org/issues/4712

Author: Roger Pack
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

ruby -v: -

Usaku NAKAMURA

unread,
May 17, 2011, 2:16:33 PM5/17/11
to ruby...@ruby-lang.org

Issue #4712 has been updated by Usaku NAKAMURA.


Thank you, Roger.

Currently we don't support NTFS ACLs.
This is the one of lacks of the important features, I think.
We shall support it someday.
The problem is who/when/how does it...


----------------------------------------
Bug #4712: File.writable? inaccurate in windows
http://redmine.ruby-lang.org/issues/4712

Author: Roger Pack
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

ruby -v: -

Roger Pack

unread,
May 17, 2011, 2:24:44 PM5/17/11
to ruby...@ruby-lang.org

Issue #4712 has been updated by Roger Pack.


Ok good to know.
----------------------------------------
Feature #4712: File.writable? inaccurate in windows
http://redmine.ruby-lang.org/issues/4712

Author: Roger Pack
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

mame (Yusuke Endoh)

unread,
Mar 25, 2012, 2:48:49 AM3/25/12
to ruby...@ruby-lang.org

Issue #4712 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to mame (Yusuke Endoh)


----------------------------------------
Feature #4712: File.writable? inaccurate in windows
https://bugs.ruby-lang.org/issues/4712#change-25124

Author: rogerdpack (Roger Pack)
Status: Assigned
Priority: Normal
Assignee: mame (Yusuke Endoh)
Category:
Target version:


Hello. Here's what happens (when a user doesn't have admin privileges in windows 7):

c:\Program Files (x86)\NetBeans 6.9.1>irb --simple-prompt
>> File.writable?('.')
=> true
>> File.writable?('./uninstall.exe')
=> true
>> File.open('./uninstall.exe', 'wb')
Errno::EACCES: Permission denied - ./uninstall.exe
from (irb):4:in `initialize'
from (irb):4:in `open'
from (irb):4

So I think writable was returning true in error here.
Cheers!
-r


--
http://bugs.ruby-lang.org/

mame (Yusuke Endoh)

unread,
Mar 26, 2012, 12:05:14 PM3/26/12
to ruby...@ruby-lang.org

Issue #4712 has been updated by mame (Yusuke Endoh).

Status changed from Assigned to Feedback
Assignee deleted (mame (Yusuke Endoh))

Hello,

usa wrote:
> The problem is who/when/how does it...

We need contribution. I mark this ticket as Feedback.

--
Yusuke Endoh <ma...@tsg.ne.jp>
----------------------------------------
Feature #4712: File.writable? inaccurate in windows
https://bugs.ruby-lang.org/issues/4712#change-25189

Author: rogerdpack (Roger Pack)
Status: Feedback


Priority: Normal
Assignee:
Category:
Target version:

Hello. Here's what happens (when a user doesn't have admin privileges in windows 7):

c:\Program Files (x86)\NetBeans 6.9.1>irb --simple-prompt
>> File.writable?('.')
=> true
>> File.writable?('./uninstall.exe')
=> true
>> File.open('./uninstall.exe', 'wb')
Errno::EACCES: Permission denied - ./uninstall.exe
from (irb):4:in `initialize'
from (irb):4:in `open'
from (irb):4

So I think writable was returning true in error here.
Cheers!
-r


--
http://bugs.ruby-lang.org/

mame (Yusuke Endoh)

unread,
Nov 20, 2012, 7:48:05 AM11/20/12
to ruby...@ruby-lang.org

Issue #4712 has been updated by mame (Yusuke Endoh).

Target version set to next minor


----------------------------------------
Feature #4712: File.writable? inaccurate in windows
https://bugs.ruby-lang.org/issues/4712#change-33248

Author: rogerdpack (Roger Pack)
Status: Feedback
Priority: Normal
Assignee:
Category:
Target version: next minor


Hello. Here's what happens (when a user doesn't have admin privileges in windows 7):

c:\Program Files (x86)\NetBeans 6.9.1>irb --simple-prompt
>> File.writable?('.')
=> true
>> File.writable?('./uninstall.exe')
=> true
>> File.open('./uninstall.exe', 'wb')
Errno::EACCES: Permission denied - ./uninstall.exe
from (irb):4:in `initialize'
from (irb):4:in `open'
from (irb):4

So I think writable was returning true in error here.
Cheers!
-r


--
http://bugs.ruby-lang.org/

djbe...@gmail.com

unread,
Feb 16, 2015, 3:05:53 PM2/16/15
to ruby...@ruby-lang.org
Issue #4712 has been updated by Daniel Berger.


Use win32-file if you want a working File.writable? on Windows.

----------------------------------------
Feature #4712: File.writable? inaccurate in windows
https://bugs.ruby-lang.org/issues/4712#change-51513

* Author: Roger Pack
* Status: Feedback
* Priority: Normal
* Assignee:
----------------------------------------
Hello. Here's what happens (when a user doesn't have admin privileges in windows 7):

c:\Program Files (x86)\NetBeans 6.9.1>irb --simple-prompt
>> File.writable?('.')
=> true
>> File.writable?('./uninstall.exe')
=> true
>> File.open('./uninstall.exe', 'wb')
Errno::EACCES: Permission denied - ./uninstall.exe
from (irb):4:in `initialize'
from (irb):4:in `open'
from (irb):4

So I think writable was returning true in error here.
Cheers!
-r



--
https://bugs.ruby-lang.org/
Reply all
Reply to author
Forward
0 new messages