guests/linux: check for proper owner [GH-3186]

This commit is contained in:
Mitchell Hashimoto 2014-03-13 09:48:22 -07:00
parent 00d73eabda
commit 3c02caf811
1 changed files with 2 additions and 2 deletions

View File

@ -11,14 +11,14 @@ module VagrantPlugins
machine.communicate.tap do |comm|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
comm.sudo("find '#{opts[:guestpath]}' ! -user vagrant -print0 | " +
comm.sudo("find '#{opts[:guestpath]}' ! -user #{username} -print0 | " +
"xargs -0 -r chown -v #{username}:")
end
end
def self.rsync_post(machine, opts)
machine.communicate.tap do |comm|
comm.sudo("find '#{opts[:guestpath]}' ! -user vagrant -print0 | " +
comm.sudo("find '#{opts[:guestpath]}' ! -user #{username} -print0 | " +
"xargs -0 -r chown -v #{opts[:owner]}:#{opts[:group]}")
end
end