I use the latest OOD (v2.0.29) on Rocky Linux 8.7, and fusermount to mount to an external storage.
The external storage is working with a file system called “gfarm”.
I want to upload a file to that directory, but I get an error like the image.
However, when I reload the page, I can open and delete the file via OOD.
In other words, I have successfully uploaded the file, but for some reason I get an error message.
I saw /var/log/ondemand-nginx/<my_account>/error.log, but there was no error message.
I also saw /var/log/messages, the following message was output.
Nov 18 21:49:35 ondemand-test gfarm2fs[19172]: [2000020] CHOWN:gfs_lchown[/home/rccs-aot/a03011/mnt]/home/hp120273/hpci003062/a.txt: no such group
For other information, the permission of the uploaded file on the directory via OOD have 600.
However, when I perform a normal copy (cp or scp) to that directory or upload a file to a normal directory via OOD, the permission of a file has 644.
I would like a hint to delete the error message for uploading a file.
I think the chown is the right path. What happens when you upload is we upload to a temporary file system then move that tmp file to the right location. Then chmod and finally chown if the partent’s setgid bit is set.
You may be able to see an error message in your browsers network tab when you actually do the upload. It may be more specific, but maybe not.
Traceback (most recent call last):
6: from test.rb:2:in `<main>'
5: from /usr/share/ruby/fileutils.rb:539:in `mv'
4: from /usr/share/ruby/fileutils.rb:1587:in `fu_each_src_dest'
3: from /usr/share/ruby/fileutils.rb:1603:in `fu_each_src_dest0'
2: from /usr/share/ruby/fileutils.rb:1589:in `block in fu_each_src_dest'
1: from /usr/share/ruby/fileutils.rb:548:in `block in mv'
/usr/share/ruby/fileutils.rb:548:in `rename': Invalid cross-device link @ rb_file_s_rename - (a.txt, ./mnt/a.txt) (Errno::EXDEV)
11: from test.rb:2:in `<main>'
10: from /usr/share/ruby/fileutils.rb:539:in `mv'
9: from /usr/share/ruby/fileutils.rb:1587:in `fu_each_src_dest'
8: from /usr/share/ruby/fileutils.rb:1603:in `fu_each_src_dest0'
7: from /usr/share/ruby/fileutils.rb:1589:in `block in fu_each_src_dest'
6: from /usr/share/ruby/fileutils.rb:547:in `block in mv'
5: from /usr/share/ruby/fileutils.rb:551:in `rescue in block in mv'
4: from /usr/share/ruby/fileutils.rb:494:in `copy_entry'
3: from /usr/share/ruby/fileutils.rb:1519:in `wrap_traverse'
2: from /usr/share/ruby/fileutils.rb:500:in `block in copy_entry'
1: from /usr/share/ruby/fileutils.rb:1434:in `copy_metadata'
/usr/share/ruby/fileutils.rb:1434:in `chown': Invalid argument @ apply2files - ./mnt/a.txt (Errno::EINVAL)
FileUtils.mv() does not support a cross-device link. A simple way to solve this issue is to change FileUtils.mv params[:file].tempfile, path.to_s as below. is this a good way?
begin
FileUtils.mv params[:file].tempfile, path.to_s
rescue
FileUtils.cp params[:file].tempfile, path.to_s
FileUtils.rm params[:file].tempfile
end
However, it is a mystery why FileUtils.mv() from /tmp to /home succeeds even though /home is mounted with NFS…