Raise 403 and 404 exceptions in DIR operations