Numeric permission:
Convert to string
String permission:
Convert to number
You can read about Linux file permissions
here
and
here
.