Page 1 of 1

Access denied for Samba Share

Posted: 2020/11/06 06:16:00
by FurnaceRocker
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

Re: Access denied for Samba Share

Posted: 2020/11/06 12:27:26
by lightman47
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.?.

Re: Access denied for Samba Share

Posted: 2020/11/25 18:11:23
by poky
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