One Samba share bad, others good [Resolved, sort of]

Issues related to configuring your network
Post Reply
nav24
Posts: 5
Joined: 2015/07/06 19:25:07

One Samba share bad, others good [Resolved, sort of]

Post by nav24 » 2015/07/06 20:22:49

After spending days researching and trying various things, I've gotten all Samba shares but one working, and need pointers to what might be messing up that remaining one. I have a new CentOS 7 install to replace an old server. I created a new RAID1 with 2 USB drives and copied the shared files from the drives out of the old server. I installed Webmin and Gnome if that matters. Using Webmin I created Samba shares, including two directories on the RAID, each set to its own mount point. I can mount one but not the other. I've tested from Windows and Mac, and both can mount some shares, but not the problematic one.

Here is some relevant directory info:

Code: Select all

# ls -Z
drwxrwsrwx. root root unconfined_u:object_r:unlabeled_t:s0 accounts
drwxrwxrwx. root root unconfined_u:object_r:unlabeled_t:s0 home
drwx------. root root system_u:object_r:unlabeled_t:s0 lost+found
drwxrwxrwx. root root unconfined_u:object_r:unlabeled_t:s0 shared
drwxrwxrwx. root root unconfined_u:object_r:unlabeled_t:s0 test
The "accounts" share works fine, as do the "home" and "test" shares, but the "shared" share does not. Initially, the label on the directories that had working shares was "unlabeled_t" and on the one that didn't work "samba_share_t", so thinking this was the issue, I changed the labels to match:

Code: Select all

# semanage fcontext -a -t unlabeled_t "/media/RAID2015/shared(/.*)?"
[root@localhost RAID2015]# restorecon -R -v /media/RAID2015/shared/
To my dismay, this did not help. I tried turning off the firewall and SELinux (numerous reboots required for this testing), but it still did not work, so I assume it is something else. Both are turned back on.

The Samba config file contains:

Code: Select all

[global]
	log file = /var/log/samba/log.%m
	load printers = yes
	write list = adm,@users
	force directory mode = 755
	encrypt passwords = yes
	passdb backend = tdbsam
	wins support = true
	unix extensions = no
	cups options = raw
	netbios name = M&Jfiles
	writeable = yes
	unix password sync = yes
	remote announce = 10.0.1.0/24 10.0.2.0/24
	force create mode = 755
	os level = 20
	security = user
	max log size = 50

[admin]
	follow symlinks = yes
	wide links = yes
	browsable = yes
	path = /media/RAID2015/accounts
	force group = adm

[shared]
	wide links = yes
	write list = @users
	path = /media/RAID2015/shared
	force group = users
	comment = Shared M&J documents
	follow symlinks = yes
	public = yes
	browsable = yes

[test]
	write list = @users
	path = /home/[my_real_user_name]
	comment = 
	valid users = @users
	public = yes
	browsable = yes
	available = yes
My user is in both the users and adm groups. I can mount and rw both the admin and test shares, but when I try mounting the shared share, after my login credentials are accepted I get a list of volumes, and when I select shared I get "There was a problem connecting to the server '10.0.1.15'. Check the server name or IP address, and then try again. If you continue to have problems, contact your system administrator." Of course this is BS, as I'm connected to the server, and have other shares mounted, and I selected the share from a list of available shares.

So I must be doing something stupid, or failing to do something obvious. Anyone see something I have not mentioned that I should check out? Or some problem in what I've already done?
Last edited by nav24 on 2015/07/07 18:32:42, edited 1 time in total.

nav24
Posts: 5
Joined: 2015/07/06 19:25:07

Re: One Samba share bad, others good

Post by nav24 » 2015/07/07 18:32:14

I have resolved this, sort of. I don't know what caused the issue, but since one Samba share was working, I decided to delete the non-working one and create a new one that pointed to the same directory. Just for kicks. And now the share is working, without any other changes. No idea why, but now I'm moving on to the next problem!

juanalonsogj
Posts: 11
Joined: 2015/02/17 23:40:06

Re: One Samba share bad, others good [Resolved, sort of]

Post by juanalonsogj » 2015/07/10 04:27:40

Great you have fixed your issue.

I am working with samba too and it is simple and quite to configure.

I strongly recommend you make a copy of the smb.conf before any change, so in case any problem you can rollback faster.

Regards.
Juan

Post Reply