03 7月 2020

Samba and System error 67

I was banging my head against a wall for a few days.

I installed and configured Samba (4.11) on CentOS 8 and one shared directory works okay, but the other did not work. 'net use' command returned 'System error 67'.
System error 67 has occurred.
The network name cannot be found.
Because the other shared directory is working, it is not a problem of a hostname, and of course, I triple checked the shared name spelling.

To make a long story short, the cause is SELinux's security context of the parent directory.

While configuring, I run the following command for the shared directory.
chcon -t samba_share_t /a/b/c
And check the result by 'ls -Z'.
drwxrwxr-x. user group system_u:object_r:samba_share_t:s0  /a/b/c
But somehow the security context of the parent directory was something like this.
drwxr-xr-x. user group unconfined_u:object_r:mnt_t:s0      /a
drwxr-xr-x. user group system_u:object_r:unlabeled_t:s0    /a/b

Parent directories of other working shared directories have system_u:object_r and usr_t or var_t. I changed those using chcon command, then the system error 67 was gone. 

0 件のコメント:

コメントを投稿