M
M
Maxim K.2015-10-21 14:45:41
Active Directory
Maxim K., 2015-10-21 14:45:41

How to set up a share in Samba centos 6?

Good afternoon. Let me start by saying that I am a very insecure Linux user. There is a test.local domain on Win Server2008R2. Hiper-V is running Centos 6.7 with Samba installed, the system is not entered into the domain. In Samba, the /mnt/public folder is shared.
smb.conf listing

#====================Global Settings=====================

[global]
workgroup = test
security = share
map to guest = bad user
#====================Share Defitioins=====================
[Public]
path = /mnt/public
browsable = yes
guest ok = yes
read only = no
create mask = 0777
directory mask = 0777

Further from under Win10 (WinXP, Win7) I go to the IP address of the machine with samba, there is the Public folder. I go to the folder, I try to create a file - there are no rights. I copy any file to this folder on a machine with Samba, they are not visible (by Windows machines).
What needs to be done and where to prescribe in order for the ball to work? Thank you in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Azazel PW, 2015-10-21
@azazelpw

Go to the server and check the rights to the directory yourself.
hands
ls -la /mnt/public
it is possible that samba itself does not have access to this directory.
chmod -R 777 /mnt/public
This is what you want to do, give rights to the share to everyone and everything.

M
Maxim K., 2015-10-21
@electromagic

as a result I get
rwxrwxrwx. 1 max root 538 Oct 21 14:35 smb.conf
The maximum that turns out is to go to the Public folder. Even the smb.conf file is not visible.

O
Oleg Nerwin, 2015-10-21
@Nerwin

try to write guest only = yes in the ball. And remove the masks, if you need to hard set the rights, use force create mode

I
imhoil, 2016-02-09
@imhoil

This is in the global
guest account = nobody
force user = nobody
This parameter maps all users as nobody, that is, if it is necessary to differentiate rights between users on shares, this will not work.
this is to the ball
valid users = nobody
create mask = 0775
Also, it may be necessary to add this user via smbpasswd -a
map to guest = bad user
in the third one I didn't use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question