mongodb / mongodb-selinux

GNU General Public License v2.0
11 stars 8 forks source link

make[1]: *** No rule to make target 'selinux/mongodb.te', needed by 'build/targeted/mongodb.pp'. Stop. #8

Open esdrasdemorais opened 1 year ago

esdrasdemorais commented 1 year ago

Please, can you help me?

bgabor78 commented 1 year ago

I had a similar error, so I made some modification, and after that it is working like a charm.

**replace this* (cd selinux; make -f /usr/share/selinux/devel/Makefile) *****to that*** (cd selinux; checkmodule -M -m -o mongodb.mod mongodb.te)


It doesn't use the fc file at all, so I had to run these commands: chcon -R -t mongod_var_lib_t /var/lib/mongo chcon -R -t mongod_log_t /var/log/mongodb chcon -R -t mongod_runtime_t /run/mongodb

Be aware, that chcon rules are temporary! For permanent rules use these commands: semanage fcontext -a -t mongod_var_lib_t '/var/lib/mongo(./)?' semanage fcontext -a -t mongod_log_t '/var/log/mongodb(./)?' semanage fcontext -a -t mongod_runtime_t '/run/mongodb(./*)?'