Getting remove_entry_secure error while using ruby application

女生的网名这么多〃 提交于 2019-12-21 01:17:35

问题


I am trying to split PDF files into images using docsplit. But it appears I have issues with my ruby installation. I keep getting the following error every time:

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

Here is the full command line output:

$ 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

Any ideas on how to fix this?


回答1:


It turns out there was a problem with my /tmp folder permissions. The following fixed the problem:

Steps that I followed are:

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


来源:https://stackoverflow.com/questions/14752236/getting-remove-entry-secure-error-while-using-ruby-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!