Hey all, I have a case that when 2 client open the same file from file server, the first client open it correctly, and the second client when open it there is not show warning that file in use. Is there any way to set when the second client or next client open the file, the file should be "read only" so just the first client which can modify the file. I have set like this on smb.conf ?level2 oplocks = no ?oplocks = no is there something miss or wrong, thx any way.
Am Monday 27 April 2009 06:55:57 schrieb yudi shiddiq:> Hey all, > > I have a case that when 2 client open the same file from file server, the > first client open it correctly, and the second client when open it there is > not show warning that file in use. >Depends upon the OS of the client as well as the application.> Is there any way to set when the second client or next client open the > file, the file should be "read only" so just the first client which can > modify the file. > > I have set like this on smb.conf > > ?level2 oplocks = no > ?oplocks = no >These settings are (S) in man smb.conf which means you should set them under< the share stanza, not in the global section.
> These settings are (S) in man smb.conf which means you should set them under< > the share stanza, not in the global section. >That is incorrect. Share parameters can also be used in the [global] section to be applied globally. Global parameters can only be used in the [global] section. From the smb.conf.5 man page: ? PARAMETERS Parameters define the specific attributes of sections. Some parameters are specific to the [global] section (e.g., /security/). Some parameters are usable in all sections (e.g., /create mask/). All others are permissible only in normal sections. For the purposes of the following descriptions the [homes] and [printers] sections will be considered normal. The letter /G/ in parentheses indicates that a parameter is specific to the [global] section. The letter /S/ indicates that a parameter can be specified in a service specific section. All /S/ parameters can also be specified in the [global] section - in which case they will define the default behavior for all services. ?