This part deals with one of the most difficult concept in Confucianism and has been a central moral teaching for Chinese in the last 2500 years. 有子 was one of Confucius's pupil and he was one of the best.
孝 can be rougly translated as filial piety - the respect and behaviour towards one's parents. Being the central concept in Confucius's moral system, there are a lot to be said about it in the rest of Dialect. 弟 is younger brother. In Chinese, elder brother is 哥, or in formal or older text as 兄. 兄弟 becomes "brotherhood". The corresponding words for sisters are 姊 and 妹. 兄弟姊妹 together becomes "siblings". Here, 孝弟 refers to the respect and behaviour between parents and children as well as respect and behaviour among siblings.
上 is "up". Down is 下. Chinese characters are pictograms. These two words are good example of how concept is expressed. The horizontal line represents the reference. 上 indicates something is "above" the reference line. That is "up". Here 上 means superiors. The character 好 is made up of two parts, 女 and 子. 女 is daughter and 子 is son. When you have both a boy and a girl, that is "good". So 好 when used as an adjective means "good". Here 好 is used as a verb, meaning "like" or "fond of".
Note, previously, I wrote 子 means "master" as in 孔子 (Master Kung). This is part of the difficulties of learning Chinese. Characters have multiple meaning, just like any language. Context is the key.
者 refers to person. 好犯上者 means those who would commit crimes (violate the instruction from above - which is the government). Note, 犯上者 is criminal - has already committed crime. 好犯上者 refers to those with a tendency to commit crime. 鮮矣 means "few".
Putting them together, 其為人也孝弟，而好犯上者鮮矣； can be translated as
其為人也孝弟，而好犯上者鮮矣；Those who respect their parent and kind to their siblings, the likelihood of being a criminal is small.
不好犯上而好作亂者，未之有也。 Those who do not commit crime, but revolt against the government, never heard of.
君子務本，本立而道生；孝弟也者，其為人之本與？ A gentleman focuses on basic. If the basic is correct, behaviour is on the right path. The meaning of 孝弟 is the basic of being human.