If you have a folder that you want users to be able to write you should just use chmod 775. The data disks are not executable and this is the default chmod when a folder is created. So if you have a folder you want to fix recursively:
change directory to one level above the folder
chmod -R 775 foldername
I already know that 775 would fix my problems but every new directory or file would be created with false permissions so it would be only a temporary solution. And somehow all new files I create get 744 instead of 644 via smb. Here is the share, files and folder I created for testing, everthing is untouched and only created using OMV-gui for the share and a Windows client for the files and folder:
anon1@sirius:/media/52bf6400-6edf-4136-9a3d-5d0e815994ee/test$ ls -lah
total 16K
drwxrwsr-x 3 root users 4.0K Sep 23 01:17 .
drwxr-xr-x 8 root root 4.0K Sep 22 18:20 ..
drwxr-sr-x 2 anon2 users 4.0K Sep 22 21:05 Neuer Ordner
-rwxr--r-- 1 anon2 users 0 Sep 22 18:23 Neues Textdokument (2).txt
-rwxr--r-- 1 anon2 users 0 Sep 22 20:29 Neues Textdokument (3).txt
-rwxr--r-- 1 anon3 users 0 Sep 22 20:50 Neues Textdokument (4).txt
-rwxr--r-- 1 anon2 users 0 Sep 23 01:17 Neues Textdokument (5).txt
-rwxr--r-- 1 anon2 users 9 Sep 22 20:22 Neues Textdokument.txt
This is the share definition in /etc/samba/smb.conf:
[test]
path = /media/52bf6400-6edf-4136-9a3d-5d0e815994ee/test/
guest ok = no
read only = no
browseable = yes
inherit acls = yes
inherit permissions = no
ea support = no
store dos attributes = no
printable = no
create mask = 0755
force create mode = 0644
directory mask = 0755
force directory mode = 0755
hide dot files = yes
valid users = "anon3","anon2"
invalid users =
read list =
write list = "anon3","anon2"
Display More
Also the better way to "fix" something like this would be
find /path/to/base/dir -type d -print0 | xargs -0 chmod 755
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644
because otherwise files would get exec permissions when using -R switch on chmod.