Bug in fileutils.rb on RHEL 6.1-2, FileUtils.mv fails when there symlinks within the directory you try to move

1 view
Skip to first unread message

Bryan Berry

unread,
Dec 7, 2011, 3:56:48 AM12/7/11
to frameo...@googlegroups.com
When I try to move a directory that contains symlinks, I get a ENOENT error message for some of the symlinks. I suspect that fileutils.rb tries to move the symlink before it move the target.

I tested on RHEL 6.1 and RHEL 6.2, w/ the  ruby-1.8.7.352-4.el6.x86_64 rpm from rbel repository

$ wget 'http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-x64.bin'
$ bash ./jdk....

ruby -e "require 'fileutils' ; FileUtils.mv '/tmp/jdk1.6.0_29', '/opt' "

I have attached the results of running strace on the command

keep up the great work on rbel! We really appreciate it.

rubiojr

unread,
Dec 8, 2011, 3:07:17 PM12/8/11
to FrameOS Linux
Thank you Bryan, greatly appreciated.

Let me have a look at that.

Rgds

On Dec 7, 9:56 am, Bryan Berry <bryan.be...@gmail.com> wrote:
> When I try to move a directory that contains symlinks, I get a ENOENT error
> message for some of the symlinks. I suspect that fileutils.rb tries to move
> the symlink before it move the target.
>
> I tested on RHEL 6.1 and RHEL 6.2, w/ the  ruby-1.8.7.352-4.el6.x86_64 rpm
> from rbel repository
>
> $ wget

> 'http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-x...


> $ bash ./jdk....
>
> ruby -e "require 'fileutils' ; FileUtils.mv '/tmp/jdk1.6.0_29', '/opt' "
>
> I have attached the results of running strace on the command
>
> keep up the great work on rbel! We really appreciate it.
>

>  trace_fileutils_mv.log
> < 1KViewDownload

Reply all
Reply to author
Forward
0 new messages