magic script parameter does not work. To reproduce (1) create a smb.conf like: ----- [share1] path = /some/where magic script = user.sh ----- (2) create "user.sh" at /some/where like: ----- #!/bin/sh date ----- and chmod +x user.sh (3) access to "share1", open user.sh and close. Then nothing is created. Log says ----- [2009/01/06 16:28:58, 5] smbd/close.c:check_magic(44) checking magic for user.sh sh: user.sh: command not found [2009/01/06 16:28:58, 3] smbd/close.c:check_magic(73) Invoking magic command user.sh gave 127 [2009/01/06 16:28:58, 2] smbd/close.c:close_normal_file(584) local closed file user.sh (numopen=0) NT_STATUS_OK -----
Created attachment 3859 [details] Patch to fix this bug This bug causes because Samba tries to run user.sh via "sh -c user.sh", but usually /some/where is not included in that users's PATH variable. Instead "sh -c ./user.sh" works.
Fix applied - thanks a *lot* ! Jeremy.