Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 23 lines (20 sloc) 0.468 kb
#!/usr/bin/env ruby
def help
puts "Usage: deny <USERNAME> <DIR>"
puts "Removes access for USERNAME to directory DIR."
exit 1
end
def sh(command, *args)
puts "#{command} #{args.join(' ')}"
if !system(command, *args)
STDERR.puts "*** ERROR"
exit 1
end
end
help if ARGV.size != 2
username, dir = ARGV
puts "cd #{dir}"
Dir.chdir(dir) do
sh "setfacl -R -x user:#{username} ."
sh "find -type d -print0 | xargs -0 -n 1000 -r setfacl -d -x user:#{username}"
end
Jump to Line
Something went wrong with that request. Please try again.