added building permissions, close #1509