Samba configuration and setup

Issues related to configuring your network
Post Reply
Peter_TI
Posts: 2
Joined: 2019/08/15 13:11:35

Samba configuration and setup

Post by Peter_TI » 2019/11/05 12:25:22

Hello,

I've installed Samba. Created a samba user and authorized a folder to share:

Code: Select all

adduser --system peter_samba
chown -R peter_samba /home/samba/
sudo 777 -R /home/samba/
The samba config is:

Code: Select all

# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.

# use local network only
#server role = standalone server
#interfaces = 127.0.0.0/8 enp0s25
#bind interfaces only = yes


[global]
        workgroup = SAMBA
#       security = SHARE
#       encrypt passwords = true
        netbios name = WORKGROUP
        passdb backend = tdbsam

        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw

[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes

[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @printadmin root
        force group = @printadmin
        create mask = 0664
        directory mask = 0775

[peter_samba]
	path = /home/samba/

	browseable = yes
	public = yes
	writable = yes
	write list = peter peter_samba
	force user = peter_samba
        read only = no
	directory mask = 0777

Undespite that i cannot create a folder from any samba client, Windows or Mac. I get permission denied errors. My sambastring is smb://192.168.178.20/peter_samba. So i am confused. I can see the folders on both cliënts but the service seems limited.
Anyone some advice on how to solve this?

User avatar
TrevorH
Forum Moderator
Posts: 27127
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Samba configuration and setup

Post by TrevorH » 2019/11/05 12:38:39

# See smb.conf.example for a more detailed config file or
Did you read that and the selinux notes within it?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Peter_TI
Posts: 2
Joined: 2019/08/15 13:11:35

Re: Samba configuration and setup

Post by Peter_TI » 2019/11/06 19:05:16

Thank you. It did help. I am quite new to centos and selinux.
This is what did the trick:

Code: Select all

sudo  setsebool -P samba_export_all_rw on
Have a nice day.

Post Reply

Return to “CentOS 8 - Networking Support”