[Samba] Copying files between 2 samba serv with ACL in mind using winbind database - solution?

2011-07-26 Thread Piotr Legiecki

Hi

The question how to copy files and preserve ACLs appears from time to
time but I have not find the right (stable and working) solution so far
on this list and on the other Internet sites. So after some thinking I
have 'discovered' my own solution.

But what is the situation. I have old samba 3.0.24 (debian) on old
computer. Now there is new computer with new samba 3.5.6 (debian 6.x).
Both are working as domain member servers (in the same domain). The
problem is: copy files form old to new server keeping in mind that there
are 100 users with their ACLs on the files.

I'm using winbindd. There are of course different UID-SID mappings on
those servers so the solutions are two (IMHO):
1. Somehow set the new server mappings on the copied files or
2. Transfer the mappings itself from old to new server

Ad.1
It is possible using some windows station to copy all the files from one
server to another. But it is a bit extra work and time consuming.
Ad.2
Use whatever linux copy tools (tar etc) to copy files. Faster but here
is the problem I have faced.

First I have dumped winbindd_idmap.tdb mapping on oldserver:
net idmap dump /var/lib/samba/winbindd_idmap.tdb  idmap_dump.txt
copied this file to new server and restored it:
net idmap restore /var/lib/samba/winbindd_idmap.tdb  idmap_dump.txt
during this restore operation the following errors (warnings?) appeared:


ignoring invalid line []

.

ignoring invalid line 
[BB]

.
Why? What does it mean? Ignore or it is serious?
Looking at the dumped file it seems to be ok.

So I have tried other solution, just copied the database file
winbindd_idmap.tdb from old to new server. After flushing the samba cache
net cache flush
and restarting winbind
the ACLs appeared to be the same on both servers. So after untaring the
files from old server it just started to work.

But my question: is it safe to do it the way I did it? The fields in
databases tends to change so I have no idea if winbindd_idmap.tdb on the
samba 3.0 is the same as on the 3.5?

Regards
Piotr

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Copying Files from XP to Samba (help needed)

2006-10-09 Thread Peter Daum
I am still desperately trying to figure out why I get such a horrible
performance trying to copy files from XP to Samba (below is my
original post to illustrate the context. Meanwhile, I found a
pretty remarkable pattern in the network traces.

Generally, the packets send from the XP machine look like this:

01: WriteAndXRequest 60 kBytes (1392 bytes payload)
02: 1460 bytes
...(usual time delta between 2 packets  0.0001 secs)
42: 1460 bytes
delta: 0.05 - 0.3 secs
43: last 188 bytes
.. WriteAndXResponse from Samba machine, da capo

It seems like what is slowing the transfer down so dramatically, is
the long gap before the last 188 bytes are sent. I can't see anything
reasonable the XP machine could be waiting for - it already got the
ack for the last preceding packet.

To emphasize again, this is not a general networking problem between
the 2 machines; it only (at leas AFAIK) occurs  when copying large
files from Windows XP to Samba shares (and at that occasion I could
reproduce it with all the Samba servers and XP clients that I checked
so far)

Any help would be greatly appreciated.

Regards,
 Peter Daum

 I noted an extremely poor performance when copying big files from
 a windows xp client to a samba share. The exact version of samba
 does not seem to matter: I tried several different samba servers
 with versions between 3.014 and 3.0.23b running on Linux 2.4.32
 and 2.6.17 (machines and network otherwise idle, clients connected
 via fast ethernet, servers via Gbit; network performance in both
 directions around 95 Mbit/s). I made several tests copying a 1GB
 file with Windows 98 and Windows XP clients. Reading the file from
 the server takes predictably around 105 seconds (~9.75 MB/s).
 
 Writing to the server takes only slightly longer on Win98 (130
 seconds, ~8 MB/s) while the same takes approximately 45 minutes
 from a XP client (I don't know whether this matters, I noted that
 on the XP write test, the directory listing on the server
 immediately shows a file with the final size - obviously a sparse
 file, repeatedly invoking du shows the gradually increasing actual
 size).
 
 I wrote a little test program that just writes data to a file and
 shows the throughput; the transfer rates I get that way are pretty
 reasonable, so it is not a general problem but something that only
 occurs on specific operations like copying.
 
 Tracing the network traffic also didn't tell me what the problem
 might be: XP uses for copying as well as for other write
 operations WriteAndXRequest, the only peculiarity I noticed is the
 slightly exotic block size of 61440 bytes per request when copying
 (which also doesn't seem to be the problem - Win98 uses the same
 block size with WriteRaw)
 
 Has anybody else made similar experiences? (Since I could see this
 issue with differently configured servers/clients, it should not
 be just my personal problem. Of course in most settings where the
 data usually goes mostly from the server to the client it is not
 obvious)
 
 Any ideas what's going on and what to do about it?
 

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Copying Files from XP to Samba (help needed)

2006-10-09 Thread Daniel Lindgren

I am also having performance problems writing to a Samba share (see previous
post about tcpdump) and I have seen a strange phenomenon: if I start tcpdump
on the Samba machine, performance increases 20 times. It would be
interesting to know if you also experience the same, just start tcpdump and
redirect output to /dev/null while/before copying files.

Regards,
Daniel Lindgren

2006/10/9, Peter Daum [EMAIL PROTECTED]:


I am still desperately trying to figure out why I get such a horrible
performance trying to copy files from XP to Samba (below is my
original post to illustrate the context. Meanwhile, I found a
pretty remarkable pattern in the network traces.

Generally, the packets send from the XP machine look like this:

01: WriteAndXRequest 60 kBytes (1392 bytes payload)
02: 1460 bytes
...(usual time delta between 2 packets  0.0001 secs)
42: 1460 bytes
delta: 0.05 - 0.3 secs
43: last 188 bytes
.. WriteAndXResponse from Samba machine, da capo

It seems like what is slowing the transfer down so dramatically, is
the long gap before the last 188 bytes are sent. I can't see anything
reasonable the XP machine could be waiting for - it already got the
ack for the last preceding packet.

To emphasize again, this is not a general networking problem between
the 2 machines; it only (at leas AFAIK) occurs  when copying large
files from Windows XP to Samba shares (and at that occasion I could
reproduce it with all the Samba servers and XP clients that I checked
so far)

Any help would be greatly appreciated.

Regards,
 Peter Daum

 I noted an extremely poor performance when copying big files from
 a windows xp client to a samba share. The exact version of samba
 does not seem to matter: I tried several different samba servers
 with versions between 3.014 and 3.0.23b running on Linux 2.4.32
 and 2.6.17 (machines and network otherwise idle, clients connected
 via fast ethernet, servers via Gbit; network performance in both
 directions around 95 Mbit/s). I made several tests copying a 1GB
 file with Windows 98 and Windows XP clients. Reading the file from
 the server takes predictably around 105 seconds (~9.75 MB/s).

 Writing to the server takes only slightly longer on Win98 (130
 seconds, ~8 MB/s) while the same takes approximately 45 minutes
 from a XP client (I don't know whether this matters, I noted that
 on the XP write test, the directory listing on the server
 immediately shows a file with the final size - obviously a sparse
 file, repeatedly invoking du shows the gradually increasing actual
 size).

 I wrote a little test program that just writes data to a file and
 shows the throughput; the transfer rates I get that way are pretty
 reasonable, so it is not a general problem but something that only
 occurs on specific operations like copying.

 Tracing the network traffic also didn't tell me what the problem
 might be: XP uses for copying as well as for other write
 operations WriteAndXRequest, the only peculiarity I noticed is the
 slightly exotic block size of 61440 bytes per request when copying
 (which also doesn't seem to be the problem - Win98 uses the same
 block size with WriteRaw)

 Has anybody else made similar experiences? (Since I could see this
 issue with differently configured servers/clients, it should not
 be just my personal problem. Of course in most settings where the
 data usually goes mostly from the server to the client it is not
 obvious)

 Any ideas what's going on and what to do about it?


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Copying files and asscoiated ACL's

2004-01-29 Thread Jacinto Trillo
Hi,

I've set up the last release of Samba (3.0.2rc1) in order to join an
Active Directory domain. Everything OK, but when it comes to copying
files with xcopy file samba-file /o (preserve ACL's with the W2003
Server xcopy) I get an 'Access Denied' Error.

I've seen this is an old issue, and has to do with the SID to UID
mappings winbind does. The error I get is:

[2004/01/29 18:28:45, 3] smbd/posix_acls.c:unpack_nt_owners(918)
  unpack_nt_owners: unable to validate owner sid for S-1-5-32-544

Does anybody know something about that?

-- 
Jacinto Trillo PĂ©rez

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Copying Files

2003-03-13 Thread TJ Davis

For some reason when I try to copy some files from a windows machine to a
samba share on a particular Linux server it creates the filename on the
share and then gives me the following error:

This folder already contains a file named foo.exe

Would you like to replace the existing file which is 0 bytes
with this one which is 13.4mb

It does not do this with all files.  I copied two different iso files that
are approximately 650mb fine several times but I have tried with exe files
and some work while some do not.




-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Copying Files

2003-03-13 Thread Thomas Bork
Hi TJ Davis,

you wrote:

 For some reason when I try to copy some files from a windows machine
 to a samba share on a particular Linux server it creates the filename
 on the share and then gives me the following error:

 This folder already contains a file named foo.exe

 Would you like to replace the existing file which is 0 bytes
 with this one which is 13.4mb

very old bug - try updating to the last stable version 2.2.7a.

der tom

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Copying Files

2003-03-12 Thread TJ Davis
For some reason when I try to copy some files from a windows machine to a
samba share on a particular Linux server it creates the filename on the
share and then gives me the following error:

This folder already contains a file named foo.exe

Would you like to replace the existing file which is 0 bytes
with this one which is 13.4mb

It does not do this with all files.  I copied two different iso files that
are approximately 650mb fine several times but I have tried with exe files
and some work while some do not.




-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] copying files to windows - permissions, time

2002-10-08 Thread bulia byak

I use Samba to access a Windows 98 box from linux. When I copy a file from linux to 
win98, there are two annoying problems:

- it complains it cannot set permissions on the new file on windows - it should 
logically ignore all such errors (the FAT volumes mounted in fstab can have a quiet 
option for this, but it does not work for smbfs volumes). 

- the new file gets current date and time, instead of the original file's date and 
time.

I've searched through manuals but found nothing about how to fix these annoyances. 
Please help!
-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Free price comparison tool gives you the best prices and cash back!
http://www.bestbuyfinder.com/download.htm

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba