Hi I have a question I dont seem find a relevant answer. The situation is that I set samba server and trying to create a file and folder from a windows machine. Everything works as expected but there is the small trouble that samba removes x bit from group and others on file. A simple example code:
drwx--x--x. 4 root root 4096 Dec 13 20:01 smb
drwxrwx--x. 2 root amikon 4096 Dec 15 22:17 pokus
[pokus]
path = /smb/pokus
public = no
writable = yes
valid users = @amikon
[root@wserver pokus]# ls -l
drwxr-xr-x. 2 vanek amikon 4096 Dec 21 10:14 dir
-rwxr--r--. 1 vanek amikon 0 Dec 21 10:14 file.txt
From many experiments I did I got the understanding that while creating an entry (file or dir) from windows samba performes logical AND from default mask and rights coming from windows machine. This behavior can be more or less influent by using create mask and force create mode (and the other set for dirs) - works as expected with no problem at all.
I found out that the problem of missing 0011 persist regardles using create mask 755 - the x bits are still removed from file. The only option is to use force create mode 755. After that bits stays cuz OR ads them.
I have tested other create mask options and seems to be that 0011 from file is removed everytime. 755, 777, 333 ... so it looks like it could be some protection mechanism removing x from group and others preventing scripts being execute bo nobody but owner????
But my question is about the exact example above. Why there is d755 but -744 as the result. Where exactly the magic of losing 0011 hapened?
Thank much for any hints.