[Win32utils-devel] [ win32utils-Support Requests-21110 ] Having problems creating junction on mounted network folder

noreply at rubyforge.org noreply at rubyforge.org
Tue Apr 21 08:44:10 EDT 2009


Support Requests item #21110, was opened at 2008-07-07 17:50
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=412&aid=21110&group_id=85

Category: win32-dir
Group: v1.0 (example)
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Having problems creating junction on mounted network folder

Initial Comment:
Hey guys,
  I'm getting a permission denied error when trying to create a junction on a network folder that I have mounted.. I can stop the code right before the DeviceIoControl call (inside Dir.create_junction) and everything seems good (link has been created as a directory and filehandle is still open).. but then I get a:
   dir.rb:120:in `create_junction': DeviceIoControl() failed: Access is denied.    
   (RuntimeError)
        from dir.rb:167

I'm using VERSION = '0.3.2' of dir.rb

The code works fine on my local disk, so there is something different about the network permissions.. Do you guys have any advice?

Thanks!
-Blair

BTW: I found that if you switch the order of the closing filehandle and removing directory it will remove the directory (which was going to be a link)..

dir.rb: 116
      unless bool
         error = 'DeviceIoControl() failed: ' + get_last_error
         CloseHandle(handle)        
         RemoveDirectory(to)
         raise error
      end


----------------------------------------------------------------------

Comment By: Chris Roby (croby)
Date: 2009-04-21 12:44

Message:
I'm having this problem also - I have permissions on the network folder as I'm creating directories and copying folders, but I'm getting an 'Access is denied' error when trying to create a junction (in a piece of the file system i've been copying into and creating folders on). 

Are there specific restrictions around create_junction and permissions? 

Thanks!

----------------------------------------------------------------------

Comment By: Daniel Berger (djberg96)
Date: 2008-07-07 20:49

Message:
Hi,

Hm, I'm not sure right off. Are you able to create a regular folder on the network folder without issue?

Thanks,

Dan

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=412&aid=21110&group_id=85


More information about the win32utils-devel mailing list