2

The following code causes me trouble:

symlink_path = "symlink/to/mnt/xyz/file"
remote_path ="/mnt/xyz/data/folderx"
FileUtils.mkdir(remote_path)
FileUtils.symlink(symlink_path, "#{remote_path}/#{db_table_name}")

FileUtils.cp on the other hand does work (replacing symlink with cp). mkdir works in both cases.

Both, the mount and the symlink work. Is it a problem to create a symlink on a mounted filesystem which points to a symlink which points to another file on that mounted filesystem?

This is the error:

Function not implemented - /home/usr1/webservice/symlink/to/mnt/xyz/file or /mnt/xyz/data/folderx/table_name
RAILS_ROOT: /home/usr1/webservice

Top of trace:

/usr/lib/ruby/1.8/fileutils.rb:338:in `symlink'
/usr/lib/ruby/1.8/fileutils.rb:338:in `ln_s'
/usr/lib/ruby/1.8/fileutils.rb:1418:in `fu_each_src_dest0'
/usr/lib/ruby/1.8/fileutils.rb:336:in `ln_s'
app/controllers/upload_controller.rb:133:in `upload'

edit:

Ok, I just found out that the problem lies within ln and not ruby. executing the ln -s command in bash leads to the Function not implemented error. Can somebody tell me why this is not possible?

David Schumann
  • 13,380
  • 9
  • 75
  • 96

0 Answers0