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

 

 

Subscribe
Notify of
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] 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 […]


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

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

 

1
0
Would love your thoughts, please comment.x
()
x
The IT Development and Technology Mini Vault | MicroDevSys.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.