fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.08k stars 111 forks source link

Cannot change ownership to uid 1001, gid 1001: Operation not permitted while provisioning with chef #156

Closed czerasz closed 1 year ago

czerasz commented 8 years ago

The nginx cookbook has problems when this /var/chef/cache directory is symlinked (/var/chef/cache -> /tmp/vagrant-cache/chef/).

Although the tar issue could be solved in this pull request, there others like this one:

==> vm:     
==> vm:     Compiled Resource:
==> vm:     ------------------
==> vm:     # Declared in /tmp/vagrant-chef/1bf6f86343592db6a07c1f357dd401cc/cookbooks/nginx/recipes/openssl_source.rb:26:in `from_file'
==> vm:     
==> vm:     remote_file("/var/chef/cache/openssl-1.0.1h.tar.gz") do
==> vm:       provider Chef::Provider::RemoteFile
==> vm:       action [:create]
==> vm:       retries 0
==> vm:       retry_delay 2
==> vm:       default_guard_interpreter :default
==> vm:       path "/var/chef/cache/openssl-1.0.1h.tar.gz"
==> vm:       backup 5
==> vm:       atomic_update true
==> vm:       source ["http://www.openssl.org/source/openssl-1.0.1h.tar.gz"]
==> vm:       use_etag true
==> vm:       use_last_modified true
==> vm:       declared_type :remote_file
==> vm:       cookbook_name :nginx
==> vm:       recipe_name "openssl_source"
==> vm:       owner "root"
==> vm:       group "root"
==> vm:       mode "0644"
==> vm:       final_checksum "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093"
==> vm:       not_if { #code block }
==> vm:     end
==> vm:     
==> vm: [2015-08-05T09:07:39+00:00] INFO: Running queued delayed notifications before re-raising exception
==> vm: [2015-08-05T09:07:39+00:00] INFO: template[authorized_ip] sending reload action to service[nginx] (delayed)
==> vm: Recipe: nginx::default
==> vm:   * service[nginx] action reload
==> vm:  (up to date)
==> vm: 
==> vm: Running handlers:
==> vm: [2015-08-05T09:07:39+00:00] ERROR: Running exception handlers
==> vm: Running handlers complete
==> vm: 
==> vm: [2015-08-05T09:07:39+00:00] ERROR: Exception handlers complete
==> vm: Chef Client failed. 8 resources updated in 9.65269449 seconds
==> vm: [2015-08-05T09:07:39+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> vm: [2015-08-05T09:07:39+00:00] ERROR: remote_file[/var/chef/cache/openssl-1.0.1h.tar.gz] (nginx::openssl_source line 26) had an error: Errno::EPERM: Operation not permitted @ chown_internal - /var/chef/cache/openssl-1.0.1h.tar.gz
==> vm: [2015-08-05T09:07:39+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

I found out that when the /var/chef/cache is not symlinked everything works file.

Is vagrant-cachier responsible for creating this /var/chef/cache -> /tmp/vagrant-cache/chef/ symlink? If yes is there an option to disable it?

czerasz commented 8 years ago

I see that /var/chef/cache it is used here.

Is it possible to disable it? From what i see in the config.rb it's not possible.

fgrehm commented 1 year ago

Hey, sorry for the silence here but this project is looking for maintainers :sweat_smile:

As per https://github.com/fgrehm/vagrant-cachier/issues/193, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue :wave: