Method: Unix::File#chgrp

Defined in:
lib/beaker/host/unix/file.rb

#chgrp(group, path, recursive = false) ⇒ Beaker::Result

Change group ownership of a path

Parameters:

  • group (String)

    Group to chgrp to

  • path (String)

    Path to chgrp

  • recursive (Boolean) (defaults to: false)

    Whether to pass the recursive flag

Returns:

See Also:



46
47
48
# File 'lib/beaker/host/unix/file.rb', line 46

def chgrp(group, path, recursive=false)
  execute("chgrp #{recursive ? '-R ' : ''}#{group} #{path}")
end