entware에서 "updatedb: 그룹 'mlocate'를 찾을 수 없음"을 수정하는 방법은 무엇입니까?

entware에서 "updatedb: 그룹 'mlocate'를 찾을 수 없음"을 수정하는 방법은 무엇입니까?

mlocateOpenWrt를 기반으로 하는 Padavan 및 Entware-ng를 실행하는 Asus RT-N56U에 이 패키지를 설치했습니다 . 이 임베디드 Linux 배포판에는 SSH가 활성화되어 있습니다.

locate결과가 최신이 아닙니다. 명령 을 사용할 때 updatedb다음 오류가 발생합니다.

updatedb: can not find group mlocate

이 문제를 어떻게 해결할 수 있습니까? 라이너를 사용하는 것이 가장 좋습니다.

답변1

addgroup패키지는 필수이며 padavan 펌웨어의 busybox에 포함되어 있습니다.

루트로 다음 단계를 수행하십시오.

grep -s mlocate /etc/group || addgroup mlocate
chgrp mlocate /opt/var/mlocate
chmod g=rx,o= /opt/var/mlocate
chgrp mlocate /opt/bin/locate
chmod g+s,go-w /opt/bin/locate
touch /opt/var/mlocate/mlocate.db
chgrp mlocate /opt/var/mlocate/mlocate.db

다음은 "updatedb: group mlocate notfound" 메시지를 수정하는 행입니다(단일 복사 및 붙여넣기 명령).

# grep -s mlocate /etc/group || addgroup mlocate;chgrp mlocate /opt/var/mlocate;chmod g=rx,o= /opt/var/mlocate;chgrp mlocate /opt/bin/locate;chmod g+s,go-w /opt/bin/locate;touch /opt/var/mlocate/mlocate.db;chgrp mlocate /opt/var/mlocate/mlocate.db

답변2

패키지가 없으신 분들을 위해 addgroup.

대신 이 명령을 사용하세요 synogroup -add mlocate

grep -s mlocate /etc/group || synogroup -add mlocate
chgrp mlocate /opt/var/mlocate
chmod g=rx,o= /opt/var/mlocate
chgrp mlocate /opt/bin/locate
chmod g+s,go-w /opt/bin/locate
touch /opt/var/mlocate/mlocate.db
chgrp mlocate /opt/var/mlocate/mlocate.db

관련 정보