1

私は vagrant とchef で働いています。すべてが進む限り、vagrant ファイルで mysql と mongodb の変更の Logpath を使用する場合にのみ、エラーが発生します。

ここに誰かがヒントを持っていて、私を助けることができれば幸いです。

Vagrantfile で私はそう述べました...

:mysql => {
        :server_root_password => 'password',
        :server_debian_password => 'password',
        :server_repl_password => 'password',
        :allow_remote_root => true,
        :log_dir => "/vagrant/www/logs/mysql",
        :tunable => {
          :log_slow_queries => "/vagrant/www/logs/mysql/slow.log",
          :log_error => true,
          :log_warnings => true
        }
},
:mongodb => {
      :logpath => "/vagrant/www/logs/mongodb"
},



================================================================================
Error executing action `create` on resource 'directory[/vagrant/www/logs/mysql]'
================================================================================

Errno::EPERM
------------
Operation not permitted - /vagrant/www/logs/mysql

Resource Declaration:
---------------------
# In /tmp/vagrant-chef/chef-solo-1/cookbooks/mysql/recipes/server.rb

117:     directory path do
118:       owner     'mysql' unless platform?('windows')
119:       group     'mysql' unless platform?('windows')
120:       action    :create
121:       recursive true
122:     end
123:   end

Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef/chef-solo-1/cookbooks/mysql/recipes/server.rb:117:in `block in from_file'

directory("/vagrant/www/logs/mysql") do
  provider Chef::Provider::Directory
  action [:create]
  retries 0
  retry_delay 2
  path "/vagrant/www/logs/mysql"
  recursive true
  cookbook_name :mysql
  recipe_name "server"
  owner "mysql"
  group "mysql"
  mode 493
end

[2013-10-31T01:03:09-07:00] DEBUG: Re-raising exception: Errno::EPERM - directory[/vagrant/www/logs/mysql] (mysql::server line 117) had an error: Errno::EPERM: Operation not permitted - /vagrant/www/logs/mysql
4

2 に答える 2

0

この行が重要な問題です。Operation not permitted - /vagrant/www/logs/mysql

つまり、ユーザーはこのパスの下にディレクトリを作成できません。mysqlユーザーにディレクトリへのアクセス権限があるかどうかを確認してください/vagrant/www/logs。多分あなたが必要+xです/vagrant

于 2013-11-03T14:31:35.227 に答える