Access denied for Samba Share

Issues related to configuring your network
Post Reply
Posts: 5
Joined: 2018/09/09 01:16:48

Access denied for Samba Share

Post by FurnaceRocker » 2020/11/06 06:16:00

Hey guys,

I have a server running Centos 7 with 2 hdds in redundancy. I set up the hdds a while back with a bunch of stuff on them, and then today I reinstalled Centos on the server. I configured samba, and from my windows machine I can look at the folder, but if I try accessing the subfolders I get the error "Windows cannot access \\hostname. You do not have permission to access. Contact your network administrator." I'm not sure what's different because I think I configured it the same as it was before. I've set permissions to 0777 and ownership to nobody:nobody. I am able to access the folders from the server, so it is possible, but I still want to be able to do it from windows.

Any help would be appreciated!


workgroup = WORKGROUP
security = user
netbios name = samba
max protocol = SMB3
security = user
map to guest = bad user
dns proxy = no

passdb backend = tdbsam

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

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

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

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

path = /Plex
browseable = yes
writable = yes
guest ok = yes
guest only = yes
read only = no
create mode = 0777
directory mode = 0777

Posts: 1257
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Access denied for Samba Share

Post by lightman47 » 2020/11/06 12:27:26

May not be the answer but at the very least set all those "777" permissions back to 775 - there's absolutely no reason anyone who connects should be able to edit your files! Then I'd set the owner back to (whoever it was:whoever it was).

I'm very poor with samba, but I wonder if making the affected folders browseable does that.?.

Posts: 108
Joined: 2013/03/27 12:18:03

Re: Access denied for Samba Share

Post by poky » 2020/11/25 18:11:23

workgroup = WORKGROUP
security = user
netbios name = samba
#max protocol = SMB3

Temporaly disable SELinux and restart Samba:
As root in terminal:
#Show status SELinux
#Temporaly disable SELinux (enable SELinux back: setenforce 1)
setenforce 0
#restart Samba
systemctl restart smb

Post Reply

Return to “CentOS 7 - Networking Support”