Newbie question: Samba and access rights?

Issues related to configuring your network
Post Reply
Lavett
Posts: 1
Joined: 2020/05/03 05:59:18

Newbie question: Samba and access rights?

Post by Lavett » 2020/05/03 06:22:13

Hi!

I have what is probably a really newbie problem with sharing folders with Samba.
I am trying to share a raid on my Centos machine with the Windows clients in the house.
I (hopefully correctly?) mounted the disk like this:

Code: Select all

mount /dev/sdb /srv/samba/shared
I have gotten to the point where I can see the Centos machine in windows, it displays a folder named Anonymous, but I do not have the rights to access it.

I have followed the guide at:
https://www.linuxtechi.com/install-conf ... -centos-8/


My /etc/samba/smb.conf:

Code: Select all

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos-8
security = user
map to guest = bad user
dns proxy = no

[Anonymous]
path = /srv/samba/shared
browsable =yes
writable = yes
guest ok = yes
read only = no

I have done this thing, as instructed in the guide:

Code: Select all

$ sudo chmod -R 0755 /srv/samba/shared
$ sudo chown -R nobody:nobody /srv/samba/shared
$ sudo chcon -t samba_share_t /srv/samba/shared
Any help would be greatly appreciated!

Thanks!

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

Re: Newbie question: Samba and access rights?

Post by TrevorH » 2020/05/03 12:55:38

Read /etc/samba/smb.conf.example too for the steps needed to allow access for selinux as well. Using semanage/restorecon is better than using chcon as it persists over a filesystem relabel.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

juhaX
Posts: 1
Joined: 2020/05/26 20:28:02

Re: Newbie question: Samba and access rights?

Post by juhaX » 2020/05/26 23:40:42

Got a similar situation with Lavett where cannot access my Samba share and get error to log:

Code: Select all

  make_connection_snum: canonicalize_connect_path failed for service...
Been investigating the issue and a share on regular disk identical share works OK but not on the Raid array. that I want to use.

The Raid array is originally from a NAS that is mounted to this server as:

Code: Select all

]# cat /etc/fstab | grep nw
UUID=358da40d-2d76-4c37-8154-8abe2154e445 /nwmax xfs defaults
The array is working fine and directory was specifically created to debug this i.e. it is not old data.

So two identical shares on different disks - other works and other doesn't. Can use touch to create files to both of the shared directories i.e also Raid is editable and permissions & ACLs work ok. Could you please help to point out what have I missed to check.

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

Re: Newbie question: Samba and access rights?

Post by TrevorH » 2020/05/27 00:41:03

It's the same answer that the OP was given. Please re-read the thread from the top.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 8 - Networking Support”