Have made some debugging:
Share works in samba 4.0.3 with home's directory
Code:
[homes]
comment = Home Directories
browseable = yes
writable = yes
valid users = %S
valid users = Tourterelles\%S
but not with all others directories like this
Code:
[SCAN]
writable=yes
path=/shares/internal/SCAN
force user=lighttpd
valid users=Marie_Therese Melissa vdm yves
write list=Marie_Therese vdm yves
read list=Melissa
lighttpd is owner of /shares/internal/SCAN directory and is defined as ' guest account' in 'smb.conf' file.
Debugging samba at level 3, and comparing 4.0.2 log with 4.0.3 , I see this in version 4.0.3 log:
Code:
[2013/02/19 15:24:01.065396, 3] ../source3/smbd/error.c:82(error_packet_set)
NT error packet at ../source3/smbd/reply.c(927) cmd=117 (SMBtconX) NT_STATUS_ACCESS_DENIED
Between version 4.0.2 and 4.0.3 ,changes have been made in source3/smbd/service.c
Code:
/*
* New code to check if there's a share security descripter
* added from NT server manager. This is done after the
* smb.conf checks are done as we need a uid and token. JRA.
*
*/
create_share_access_mask(conn, snum);
if ((conn->share_access & FILE_WRITE_DATA) == 0) {
if ((conn->share_access & FILE_READ_DATA) == 0) {
/* No access, read or write. */
DEBUG(0,("make_connection: connection to %s "
"denied due to security "
"descriptor.\n",
lp_servicename(talloc_tos(), snum)));
status = NT_STATUS_ACCESS_DENIED;
goto err_root_exit;
} else {
conn->read_only = True;
}
}
/* Initialise VFS function pointers */
if (!smbd_vfs_init(conn)) {
DEBUG(0, ("vfs_init failed for service %s\n",
lp_servicename(talloc_tos(), snum)));
status = NT_STATUS_BAD_NETWORK_NAME;
goto err_root_exit;
}
has been replaced by
Code:
/*
* Set up the share security descripter
*/
status = check_user_share_access(conn,
conn->session_info,
&conn->share_access,
&conn->read_only);
if (!NT_STATUS_IS_OK(status)) {
goto err_root_exit;
}
/* Initialise VFS function pointers */
if (!smbd_vfs_init(conn)) {
DEBUG(0, ("vfs_init failed for service %s\n",
lp_servicename(talloc_tos(), snum)));
status = NT_STATUS_BAD_NETWORK_NAME;
goto err_root_exit;
}
This is probably why version 4.0.3 does not work.
---------- Post added at 06:30 PM ---------- Previous post was at 05:17 PM ----------

Originally Posted by
Védéhème
This is probably why version 4.0.3 does not work.
I'm sure now.
I have recompiled samba 4.0.3 , replacing only source3/smbd/service.c with service.c version from samba 4.0.2 . ... and it works fine.