Header Shadow Image


chcon: failed to change context of Operation not supported

Trying to change the sharing through selinux results in this:


[root@mbpc-pc mnt]# chcon -R -t samba_share_t /mnt/FLASHLexarMedia-32GB-1
chcon: failed to change context of `/mnt/FLASHLexarMedia-32GB-1' to `system_u:object_r:samba_share_t:s0': Operation not supported
[root@mbpc-pc mnt]#

[root@mbpc-pc mnt]# ls -lda –author -Z FLASHLexarMedia-32GB-1
drwx——. root root system_u:object_r:dosfs_t:s0     FLASHLexarMedia-32GB-1
[root@mbpc-pc mnt]#

[root@mbpc-pc mnt]# ls -lda –author -Z FLASHKingstonCenton
drwxrwxrwx. root root system_u:object_r:fusefs_t:s0    FLASHKingstonCenton
[root@mbpc-pc mnt]#

The issue is that you need to put the context line in the /etc/fstab mount command for NFS / VFAT like this:

[root@mbpc-pc mnt]# grep /mnt/FLASHKingstonCenton /etc/fstab
/dev/sdj1                                       /mnt/FLASHKingstonCenton        ntfs    context=system_u:object_r:samba_share_t:s0 0 2
[root@mbpc-pc mnt]#

[root@mbpc-pc mnt]# ls -lda –author -Z FLASHKingstonCenton
drwxrwxrwx. root root system_u:object_r:samba_share_t:s0 FLASHKingstonCenton
[root@mbpc-pc mnt]#

This should allow you to write/read to this volume from your windows network mounts.

Cheers,
TK

 

 

One Response to “chcon: failed to change context of Operation not supported”

  1. […] happen when NFS home folders are not mounted.  Now borrowing slightly off of our earlier post on a similar NFS issue, we check the permissions on the folder and set the context […]

Leave a Reply

You must be logged in to post a comment.


     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License