Re: how to set a directory to system_u?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



What about

  semanage fcontext   ??

see "man semanage-fcontext"

peter


Am 02.10.21 um 13:49 schrieb hw:
Hi,

I'm trying to a lable a directory for ejabberd to store files
that were uploaded with the http_upload module.  Apparently
I should set this to 'system_u:object_r:ejabberd_var_lib_t:s0'
since all the files in /var/lib/ejabberd are.  So:


ls -laZ /srv/data/
unconfined_u:object_r:ejabberd_var_lib_t:s0 320 Jul 29 23:55 ejabberd
semanage fcontext -a -t ejabberd_var_lib_t -s system_u '/srv/data/ejabberd(/.*)?'
restorecon -R /srv/data/ejabberd/
ls -laZ /srv/data/
unconfined_u:object_r:ejabberd_var_lib_t:s0 320 Jul 29 23:55 ejabberd


Why doesn't this work?  Why can't they finally write some decent tool to
use selinux that allows us to keep it enabled???

How can I set up the directory for ejabberd to store files in?



_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux