Re: Samba HOWTO wiki bug: chcon samba_share_t

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



On Fri, 2018-05-04 at 14:55 -0700, Akemi Yagi wrote:
> On Fri, May 4, 2018 at 2:26 PM, Warren Young <warren@xxxxxxxxxxx>
> wrote:
> > On May 4, 2018, at 3:03 PM, Akemi Yagi <amyagi@xxxxxxxxx> wrote:
> > > 
> > > On Fri, May 4, 2018 at 12:03 PM, Warren Young <warren@xxxxxxxxxxx
> > > > wrote:
> > > > 
> > > >    $ sudo chcon -R -t samba_share_t /path/to/share
> > > 
> > > Updated the page as suggested. Thanks.
> > 
> > Thanks!
> > 
> > I now see another instance of this in section 3.  Instead of
> > copying the text verbatim, it should probably be:
> > 
> >     chcon -R -t samba_share_t /mnt/data
> > 
> > …in order to match the text above it.
> 
> Warren,
> 
> I was just informed that the chcon command your suggested was
> originally there, but it was replaced with the 2 line version
> sometime
> ago. The reason given was "Replace chcon by semanage/restorecon pair
> to survive filesystem relabel".

The comment is correct: chcon will not survive a relabel. You need to
update the database first (semanage fcontext) and then let a relabel
apply the new context.

Louis
_______________________________________________
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