read/write,write/write lock with smbclient fails


 
Thread Tools Search this Thread
Special Forums IP Networking read/write,write/write lock with smbclient fails
Prev   Next
# 1  
Old 03-05-2010
read/write,write/write lock with smbclient fails

Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the smb.conf file:
lock directory =/var/samba/lock
locking=yes
strict locking = no
oplocks=yes
level2 oplocks = no
kernel oplocks =yes
raw read= yes
raw write = yes
Could anyone please let me know that what can I do to disallow read while write is going on and also restrict simultaneous writes?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug?

(Apologies for any typos.) OSX 10.12.3 AND Windows 10. This is for the serious Python experts on at least 3.5.x and above... In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly. Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies

2. Shell Programming and Scripting

Is it possible to write write multiple cronjobs in shellscript??

Hi All, I need the answer of below question? 1) How to write multiple cronjobs in shellscript? Is there any way or we cant write in shellscript... Regards, Priyanka (2 Replies)
Discussion started by: pspriyanka
2 Replies

3. Shell Programming and Scripting

Setuid not working in Linux as script fails to write to file.

Hi, I have the following 3 test files to test setuid bit which if it works I would like to implement in our application. However setuid doesnot seem to be having any impact on my test below.Following are the 3 files of interest in /tmp/ folder. $ ls -ltr *env* -rw------- 1 g332008 users 6... (23 Replies)
Discussion started by: waavman
23 Replies

4. Programming

Need help about read() and write() on TCP/IP

HI I need to implement a client/server TCP application. the customer is the client and the bartender is the server. When the customer enter the Bar, client connects to the server Server should reply the client immediately. Other wise if the server is busy, it should send an update message... (10 Replies)
Discussion started by: lixiao1212
10 Replies

5. UNIX for Advanced & Expert Users

when a process fails to write to /dev/log

Hi , when a process fails to write to /dev/log ? (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

6. Shell Programming and Scripting

How to write a directory lock shell script?

Hi there, pleas I want this script urgently. how to lock a directory by shell script? (12 Replies)
Discussion started by: joneggk
12 Replies

7. Programming

read/write files

Hi all, I have a problem with some read/write functions. I have a .bin file which contains a lot of structures as follows: struct alumno { char id; char apellido1; char apellido2; char nombre; float nota1p; float nota2p; float notamedia; char photofilename; }; What I have... (3 Replies)
Discussion started by: Attenea
3 Replies

8. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies

9. Shell Programming and Scripting

read and write from a file

I have tried to show the file name whose size is greater than 200 byte in current directory. Please help me. ls -l | tr -s " " " " | cut -f 5,9 -d " " >out.txt #set -a x `cat out.txt` i=0 `cat out.txt` | while do read x echo $x #re=200 j=0 if }" < "200" ] then echo $j j=`expr $j... (2 Replies)
Discussion started by: rinku
2 Replies
Login or Register to Ask a Question
SMB(4)							   BSD Kernel Interfaces Manual 						    SMB(4)

NAME
smb -- SMB generic I/O device driver SYNOPSIS
device smb DESCRIPTION
The smb character device driver provides generic i/o to any smbus(4) instance. In order to control SMB devices, use /dev/smb? with the ioctls described below. Any of these ioctl commands takes a pointer to struct smbcmd as its argument. #include <sys/types.h> struct smbcmd { char cmd; int count; u_char slave; union { char byte; short word; char *byte_ptr; short *word_ptr; struct { short sdata; short *rdata; } process; } data; }; The slave field is always used, and provides the address of the SMBus slave device to talk to. The slave address is specified in the seven most significant bits (i.e. ``left-justified''). The least significant bit of the slave address must be zero. Ioctl Description SMB_QUICK_WRITE The QuickWrite command just issues the device address with write intent to the bus, without transferring any data. SMB_QUICK_READ The QuickRead command just issues the device address with read intent to the bus, without transferring any data. SMB_SENDB The SendByte command sends the byte provided in the cmd field to the device. SMB_RECVB The ReceiveByte command reads a single byte from the device which will be returned in the cmd field. SMB_WRITEB The WriteByte command first sends the byte from the cmd field to the device, followed by the byte given in data.byte. SMB_WRITEW The WriteWord command first sends the byte from the cmd field to the device, followed by the word given in data.word. Note that the SMBus byte-order is little-endian by definition. SMB_READB The ReadByte command first sends the byte from the cmd field to the device, and then reads one byte of data from the device. The returned data will be stored in the location pointed to by data.byte_ptr. SMB_READW The ReadWord command first sends the byte from the cmd field to the device, and then reads one word of data from the device. The returned data will be stored in the location pointed to by data.word_ptr. SMB_PCALL The ProcedureCall command first sends the byte from the cmd field to the device, followed by the word provided in data.process.sdata. It then reads one word of data from the device, and returns it in the location pointed to by data.process.rdata. SMB_BWRITE The BlockWrite command first sends the byte from the cmd field to the device, followed by count bytes of data that are taken from the buffer pointed to by data.byte_ptr. The SMBus specification mandates that no more than 32 bytes of data can be transferred in a single block read or write command. This value is available in the constant SMB_MAXBLOCKSIZE. SMB_BREAD The BlockRead command first sends the byte from the cmd field to the device, and then reads count bytes of data that from the device. These data will be returned in the buffer pointed to by data.byte_ptr. The read(2) and write(2) system calls are not implemented by this driver. ERRORS
The ioctl(2) commands can cause the following driver-specific errors: [ENXIO] Device did not respond to selection. [EBUSY] Device still in use. [ENODEV] Operation not supported by device (not supposed to happen). [EINVAL] General argument error. [EWOULDBLOCK] SMBus transaction timed out. SEE ALSO
ioctl(2), smbus(4) HISTORY
The smb manual page first appeared in FreeBSD 3.0. AUTHORS
This manual page was written by Nicolas Souchu. BSD
February 6, 2009 BSD