获取remove_entry_secure错误,而使用Ruby应用程序(Getting remove

2019-08-16 19:26发布

我试图PDF文件分割成使用docsplit图像。 但现在看来,我与我的红宝石安装问题。 我把每一次收到以下错误:

/usr/lib/ruby/1.8/fileutils.rb:694:in `remove_entry_secure': parent directory is world writable

下面是完整的命令行输出:

$ docsplit images pdf-test.pdf
/usr/lib/ruby/1.8/fileutils.rb:694:in `remove_entry_secure': parent directory is world writable, FileUtils#remove_entry_secure does not work; abort: "/tmp/d20130207-6739-1f9i6b" (parent directory mode 42777) (ArgumentError)
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:51:in `convert'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:19:in `extract'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:19:in `each'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:19:in `extract'
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `each_with_index'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:18:in `each'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:18:in `each_with_index'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:18:in `extract'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:16:in `each'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit/image_extractor.rb:16:in `extract'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/lib/docsplit.rb:63:in `extract_images'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/bin/../lib/docsplit/command_line.rb:44:in `run'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/bin/../lib/docsplit/command_line.rb:37:in `initialize'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/bin/docsplit:5:in `new'
    from /var/lib/gems/1.8/gems/docsplit-0.6.4/bin/docsplit:5
    from /usr/bin/docsplit:19:in `load'
    from /usr/bin/docsplit:19

有想法该怎么解决这个吗?

Answer 1:

原来有一个与我有问题/tmp文件夹的权限。 下面的解决了这一问题:

我跟着步骤是:

user@host-$: chmod 777 -R /tmp
user@host-$: chmod o+t -R /tmp
user@host-$: ls -l tmp
drwxrwxrwt 2 user group 4096 2009-11-21 17:01 tmp


文章来源: Getting remove_entry_secure error while using ruby application