[Samba] Need SELinux help

ToddAndMargo ToddAndMargo at zoho.com
Sat Aug 20 06:57:03 UTC 2016


On 08/16/2016 06:05 AM, Toshaan Bharvani | VanTosh via samba wrote:
> Todd,
>
>
> On 16/08/16 07:04, ToddAndMargo via samba wrote:
>> Hi All,
>>
>> Fedora Core 24, x64
>> samba-4.4.5-1.fc24.x86_64
>>
>> I am using the following direction to set up SELinux with Samba:
>>
>> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/sect-Managing_Confined_Services-Samba-Configuration_examples.html 
>>
>>
>>
>> to set up SELinux with Samba
>>
>> 1)  I created a directory called /export
>>
>> # ls -al /export
>> total 28
>> drwxrwxr-x   7 public users 4096 Aug 15 21:47 .
>> dr-xr-xr-x. 21 root   root  4096 Aug 15 21:47 ..
>> drwxrwxr-x   2 public users 4096 Aug 15 19:53 accounting
>> drwxrwxr-x   2 public users 4096 Aug 15 19:53 facilities
>> drwxrwxr-x   2 public users 4096 Aug 15 19:53 maintenance
>> drwxrwxr-x   2 public users 4096 Aug 15 19:53 operations
>> drwxrwxr-x   2 public users 4096 Aug 15 19:48 public
>>
>> 2) I ran the following command from the manual above and
>> got the following error.
>>
>> # semanage fcontext -a -t samba_share_t "/export(/.*)?"
>> libsemanage.dbase_llist_query: could not query record value (No such
>> file or directory).
>> FileNotFoundError: [Errno 2] No such file or directory
>>
>>
>> What do they mean "No such file or directory"?
>> What am I doing wrong?
> I am presuming the 'export' is seen as a command in place of a folder.
> What happens you try the folder 'exports' or 'shares'?
> And they do not need to exist to be added to the SELinux fcontext 
> listing.
>
>
>>
>> Many thanks,
>> -T
>>
>
> Regards,
> Toshaan.
>
Hi Toshaan,

That was it.  I changed "export" to "exports" and that fixed
the issue.

I also reported to bug to Red Hat:

SELinux run afoul of keyword "/export"
https://bugzilla.redhat.com/show_bug.cgi?id=1368624

Thank you!
-T

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





More information about the samba mailing list