I think this does the same:
```bash
chown -R mapred:mapred ~mapred
chmod 400 ~mapred/.ssh/*
```