In this wiki article: https://wiki.centos.org/HowTos/SetUpSamba ?there is a command down in section 2 that gives an error here on CentOS 7: $ sudo semanage fcontext ?at samba_share_t /path/to/share ?noise noise noise? semanage: error: unrecognized arguments: samba_share_t /path/to/share That and the following restorecon command can be replaced by a single shorter command, which also fixes the symptom: $ sudo chcon -R -t samba_share_t /path/to/share
On Fri, May 4, 2018 at 12:03 PM, Warren Young <warren at etr-usa.com> wrote:> In this wiki article: > > https://wiki.centos.org/HowTos/SetUpSamba > > ?there is a command down in section 2 that gives an error here on CentOS 7: > > $ sudo semanage fcontext ?at samba_share_t /path/to/share > ?noise noise noise? > semanage: error: unrecognized arguments: samba_share_t /path/to/share > > That and the following restorecon command can be replaced by a single shorter command, which also fixes the symptom: > > $ sudo chcon -R -t samba_share_t /path/to/shareUpdated the page as suggested. Thanks. Akemi
On May 4, 2018, at 3:03 PM, Akemi Yagi <amyagi at gmail.com> wrote:> > On Fri, May 4, 2018 at 12:03 PM, Warren Young <warren at etr-usa.com> 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.
On 05/04/2018 12:03 PM, Warren Young wrote:> ?there is a command down in section 2 that gives an error here on CentOS 7: > > $ sudo semanage fcontext ?at samba_share_t /path/to/share > ?noise noise noise? > semanage: error: unrecognized arguments: samba_share_t /path/to/shareWhat is "noise" exactly?? I don't get errors from that command: # semanage fcontext -at samba_share_t /srv/samba #> That and the following restorecon command can be replaced by a single shorter command, which also fixes the symptom:As others pointed out, chcon is not a replacement for registering a persistent file context.
On May 4, 2018, at 5:13 PM, Gordon Messmer <gordon.messmer at gmail.com> wrote:> > On 05/04/2018 12:03 PM, Warren Young wrote: >> ?there is a command down in section 2 that gives an error here on CentOS 7: >> >> $ sudo semanage fcontext ?at samba_share_t /path/to/share >> ?noise noise noise? >> semanage: error: unrecognized arguments: samba_share_t /path/to/share > > What is "noise" exactly? I don't get errors from that command:The full message is: usage: semanage [-h] {import,export,login,user,port,interface,module,node,fcontext,boolean,permissive,dontaudit} ... semanage: error: unrecognized arguments: samba_share_t '/path/to/share(/.*)?'