Open freepaddler opened 1 year ago
Sorry, where did you command "ls -al" ? mount point ? or share directory ?
Have you tried "modefromsid" mount option if you have used cifs mount ?
Sorry, where did you command "ls -al" ? mount point ? or share directory ?
at share directory (where ksmbd is running)
Have you tried "modefromsid" mount option if you have used cifs mount ? yep, just tried - the same result
it really behaves as umask 0022, I tried different "create mask" values
Hm... Stranged.. I also checked it again. but it work fine as expected. what is your local filesystem ?
create mask = 0664
-rw-rw-r-- 1 linkinjeon linkinjeon 0 1월 20 14:47 aa
-rw-rw-r-- 1 linkinjeon linkinjeon 0 1월 20 14:49 bb
-rw-rw-r-- 1 linkinjeon linkinjeon 0 1월 20 14:49 cc
here are system specs:
$ uname -a
Linux alpine2 5.15.88-0-lts #1-Alpine SMP Mon, 16 Jan 2023 08:10:32 +0000 aarch64 Linux
$ head -1 /etc/fstab
UUID=40b62555-076a-4d1d-837f-63e1814d80cc / ext4 rw,relatime 0 1
$ ksmbd.mountd -V
ksmbd-tools version : 3.4.6
don't know if it makes sence, but also I checked umask of ksmbd running processess:
$ igrep umask /proc/3708/status
Umask: 0022
Ah, Okay, Are you using ksmbd in alpine2's linux kernel ? or out of tree ksmbd(cifsd-team/ksmbd) ? If you are using the one in alpine2's linux kernel, I want to check kernel source.
I am wondering the below patch is in your kernel source... https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/ksmbd/ksmbd_netlink.h?h=v5.15.89&id=8202aa60f077be8977bda2ecd5bd4350a0a5ab1e
Ah, Okay, Are you using ksmbd in alpine2's linux kernel ? or out of tree ksmbd(cifsd-team/ksmbd) ? If you are using the one in alpine2's linux kernel, I want to check kernel source.
I use ksmbd in alpine2's linux kernel (the default alpine kernel from alpine main repo branch 3.17)
Hm, Can you check it with out of tree ksmbd here ?
I can't find it's kernel source or tree. I guess that alpine2's linux kernel doesn't update ksmbd from the latest linux 5.15 stable kernel.
Hm, Can you check it with out of tree ksmbd here ?
tried cifsd-team/ksmbd on 5.15.89 and even 6.1.7 (alpine edge repository) with the same result :(
Hm.. Don't know.. can you share your ksmb.conf file with me ? want to check it.
Hm.. Don't know.. can you share your ksmb.conf file with me ? want to check it.
# cat /etc/ksmbd/ksmbd.conf
[global]
; server settings
server string = alpine2
netbios name = alpine2
workgroup = alpinelab
interfaces = eth0
bind interfaces only = yes
tcp port = 445
; share settings
root directory = /opt
guest account = nobody
map to guest = bad user
restrict anonymous = 0
create mask = 0664
directory mask = 2775
guest ok = no
browseable = no
hide dot files = yes
;force user = nobody
;force group = nobody
;force directory mode = 0777
;force create mode = 0777
;inherit owner = yes
[user]
path = /user
writeable = yes
valid users = user
Hm.. Don't know.. can you share your ksmb.conf file with me ? want to check it.
just tested on Debian sid Linux deb11 6.1.0-2-arm64 #1 SMP Debian 6.1.7-1 (2023-01-18) aarch64 GNU/Linux
and here it works as expected
also ksmbd processes have umask 0000
# ps afx | grep ksmbd
1090 ? S 0:00 \_ [ksmbd-ens160]
1119 ? S 0:00 \_ [ksmbd:60445]
1127 pts/0 S+ 0:00 \_ grep ksmbd
1088 ? Ss 0:00 ksmbd.mountd -c /etc/ksmbd/ksmbd.conf
1089 ? S 0:00 \_ ksmbd.mountd -c /etc/ksmbd/ksmbd.conf
# grep -i umask /proc/{1090,1119}/status
/proc/1090/status:Umask: 0000
/proc/1119/status:Umask: 0000
@freepaddler Can I understand that there is no problem if you change alpine2 to Debian?
@freepaddler Can I understand that there is no problem if you change alpine2 to Debian?
yep, I raised an issue in Alpinelinux community, thanks for support!
Sounds like an issue with ksmbd-tools. musl probably handles the necessary function differently.
It seems that umask 022 is always applied to created files and directories. And it is impossible to set g+w and o+w permissions.
ksmbd.conf:
ls -la .
Alpine Linux 3.17 with 5.15.86 kernel.