Re: You have not permission to view content of this location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Dec 07, 2016 at 05:08:11PM +0800, truename wrote:
> sudo chown u1 /data
> sudo chgrp g1 /data
> 
> sudo chmod ugo+rwx /data
> 
> I edit /etc/samba/smb.conf:
> 
> [data]
>     comment = data
>     path = /data
>     valid users = u1,u2
>     write list = u1,u2
>     create mask = 0777
>     sync always = Yes
> ;    hide dot files = yes
> ;    writeable = no

Out of curiosity, I ran:

# matchpathcon /data
/data	system_u:object_r:etc_runtime_t:s0

I'm not sure why /data is labeled etc_runtime_t, but I suspect that's
why you can't export its contents via Samba, SELinux is probably
preventing it.

I suggest following the directions here:
https://wiki.centos.org/HowTos/SetUpSamba#head-86233024cba06a1e4f554e763a2f634a61eae9b8

and run:

semanage fcontext -a -t samba_share_t '/data(/.*)?'
restorecon -R /data

-- 
Jonathan Billings <billings@xxxxxxxxxx>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux