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?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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
3. Programming
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
4. Shell Programming and Scripting
Hi there,
pleas I want this script urgently. how to lock a directory by shell script? (12 Replies)
Discussion started by: joneggk
12 Replies
5. UNIX for Advanced & Expert Users
Hi ,
when a process fails to write to /dev/log ? (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies
6. Programming
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. Programming
(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
SMBGET(1) User Commands SMBGET(1)
NAME
smbget - wget-like utility for download files over SMB
SYNOPSIS
smbget [-a, --guest] [-r, --resume] [-R, --recursive] [-u, --username=STRING] [-p, --password=STRING] [-w, --workgroup=STRING]
[-n, --nonprompt] [-d, --debuglevel=INT] [-D, --dots] [-P, --keep-permissions] [-o, --outputfile] [-f, --rcfile] [-q, --quiet]
[-v, --verbose] [-b, --blocksize] [-O, --stdout] [-?, --help] [--usage] {smb://host/share/path/to/file} [smb://url2/] [...]
DESCRIPTION
This tool is part of the samba(7) suite.
smbget is a simple utility with wget-like semantics, that can download files from SMB servers. You can specify the files you would like to
download on the command-line.
The files should be in the smb-URL standard, e.g. use smb://host/share/file for the UNC path \\HOST\SHARE\file.
OPTIONS
-a, --guest
Work as user guest
-r, --resume
Automatically resume aborted files
-R, --recursive
Recursively download files
-u, --username=STRING
Username to use
-p, --password=STRING
Password to use
-w, --workgroup=STRING
Workgroup to use (optional)
-n, --nonprompt
Don't ask anything (non-interactive)
-d, --debuglevel=INT
Debuglevel to use
-D, --dots
Show dots as progress indication
-P, --keep-permissions
Set same permissions on local file as are set on remote file.
-o, --outputfile
Write the file that is being downloaded to the specified file. Can not be used together with -R.
-O, --stdout
Write the file that is being downloaded to standard output.
-f, --rcfile
Use specified rcfile. This will be loaded in the order it was specified - e.g. if you specify any options before this one, they might
get overriden by the contents of the rcfile.
-q, --quiet
Be quiet
-v, --verbose
Be verbose
-b, --blocksize
Number of bytes to download in a block. Defaults to 64000.
-?, --help
Show help message
--usage
Display brief usage message
SMB URLS
SMB URL's should be specified in the following format:
smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]]
smb:// means all the workgroups
smb://name/ means, if name is a workgroup, all the servers in this workgroup, or if name is a server, all the shares on this server.
EXAMPLES
# Recursively download 'src' directory
smbget -R smb://rhonwyn/jelmer/src
# Download FreeBSD ISO and enable resuming
smbget -r smb://rhonwyn/isos/FreeBSD5.1.iso
# Recursively download all ISOs
smbget -Rr smb://rhonwyn/isos
# Backup my data on rhonwyn
smbget -Rr smb://rhonwyn/
BUGS
Permission denied is returned in some cases where the cause of the error is unknown (such as an illegally formatted smb:// url or trying to
get a directory without -R turned on).
VERSION
This man page is correct for version 3 of the Samba suite.
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
The smbget manpage was written by Jelmer Vernooij.
Samba 3.5 06/18/2010 SMBGET(1)