Hi TrevorH,
maybe as I writing my reply at 3AM my message wasn't clear enough, so trying to clarify. My first touch with Unix is from mid 80's and what I have learned over the years is that having someone to review the problem is really helpful to find out the root cause. Although I have a few miles under my belt this is my first touch with Samba. Yes, I did read the example as well as quite a few other things before posting my query as didn't find anything useful. So to comment
smb.conf.example SWLinux notes topics:
- setsebool -P samba_domain_controller on - done
- setsebool -P samba_enable_home_dirs on - not done as not sharing home " Turn the samba_enable_home_dirs Boolean on if you want to share home"
- samba_share_t - done, see below
- Use the samba_export_all_ro or samba_export_all_rw Boolean to share system directories - not done as not sharing system directories
- To run scripts - not done as no scripts to run
So, I'm sure that the issue is quite obvious, but I have become blind for it. Therefore did my first post ever in the hope of finding a pair of fresh eyes to point me on things to try out next.
So to investigate this I did create two identical shares - one for the Raid array where I want to make the share and one to the disk containing
/ directory. They can be seen in the
testparm output:
Code: Select all
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
load printers = No
map to guest = Bad User
security = USER
idmap config * : backend = tdb
[test]
path = /koe/x
read only = No
valid users = @smbmax
[test2]
path = /nwmax/test
read only = No
valid users = @smbmax
From these two the share
test works and the target directory is defined as:
Code: Select all
[mestari@mato koe]$ pwd
/koe
[mestari@mato koe]$ ls -ldZ x
drwxr-xr-x. 2 root smbmax unconfined_u:object_r:samba_share_t:s0 6 May 27 01:48 x
[mestari@mato koe]$ ls -al
total 0
drwxr-xr-x. 3 root root 15 May 27 01:48 .
dr-xr-xr-x. 19 root root 263 May 27 01:48 ..
drwxrwxr-x. 2 root smbmax 6 May 27 01:48 x
Included also the
ls -al to show how the access rights are set all the way from the root.
As you can see the group for the target directory is set as
smbmax as per the valid users parameter above. Like said I can map this to Windows PC and use it without problems.
Then I created new directory
test to my Raid array that is mounted as
/nwmax:
Code: Select all
[mestari@mato nwmax]$ pwd
/nwmax
[mestari@mato nwmax]$ ls -ldZ test
drwxrwxr-x. 2 root smbmax unconfined_u:object_r:samba_share_t:s0 16 May 27 02:29 test
[mestari@mato nwmax]$ ls -al
total 0
drwxrwxr-x. 10 root root 111 May 27 01:57 .
dr-xr-xr-x. 19 root root 263 May 27 01:48 ..
... some directories removed here ...
drwxrwxr-x. 2 root smbmax 16 May 27 02:29 test
This is share
test2.
I added the user mestari to the
smbmax group to try out check with touch from command line if something is preventing users to write on this disk but that didn't seem to be a problem.
Did check logs. No conflicts in
audit log. The samba log message indicating an issue is in my previous post.
So I don't get it why of the two identical shares on the same server one works and other doesn't. Could you please provide ideas on what to check next?