Project

General

Profile

Actions

Bug #9850

closed

FileUtils.mv shouldn't try to make sure the owner is preserved

Added by rosenfeld (Rodrigo Rosenfeld Rosas) almost 10 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
[ruby-core:62673]

Description

I found an issue with one of our servers due to user ids not being mapped correctly between the NFS server and client. In the NFS server side there was a settings to consider anonymous users as an specific user and that worked fine for a while.

When we came with a different implementation that writes documents to a temp dir, process them and move to the target directory I found that it wouldn't work on the server for which the owner of the mounted NFS export was set to nobody.

I consider this a bug because running "mv" on the Linux server wouldn't trigger any errors but FileUtils.mv will try to "chown" after moving the file and I don't think it should do anything different from simply moving the file.

I had to spend some time fixing the user id mapping on that server to fix the problem but I thought it would be a good thing to do to report this issue since this may be considered a bug of FileUtils.mv.

Actions

Also available in: Atom PDF

Like0
Like0Like0