Green, Paul | 1 Jan 2003 16:13
Picon

RE: am I missing something, or are permissions always preserved?

Ben [mailto:bench <at> tukati.com]

> I'm relatively new to rsync, but it seems to me that if there's an
> option to perserve permissions and you don't set it, then rsync
> shouldn't do anything with permissions.

Sounds good, but recall how POSIX / Unix system calls work. To create a
file, you have to specify what mode (permission) it should have.  There is
no way to tell creat() or open() to "do the default thing."

I think a case could be made that this is a defect / incompatibility in the
underlying file system layer that issues complaints about permissions.
Before I attempted to code any kind of a fix, I'd sure want to read the
specs of this layer and understand how the designers thought this problem
should be approached.

Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Computer, Inc.
Voice: +1 978-461-7557; FAX: +1 978-461-3610; Video on request.
Speaking from Stratus not for Stratus
--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

va_public | 1 Jan 2003 17:39

Simulating rdist?

rsync is great for syncing 2 directory trees, but I want to maintain 
a master source tree on one machine and copy that to multiple 
machines. i.e. basically what rdist does

The only way I can see of doing this with rsync is to have multiple 
cron jobs

0 * * * * rsync ... machine1:...
0 * * * * rsync ... machine2:...
...and so on.

Is there a more elegant/compact way of doing this?

Thanks

--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

HACKER ve GUVENLIK REHBERI | 1 Jan 2003 19:21

GUVENDE MISINIZ ?

TURKIYE'DE BIR ILK !

SADECE 15.000.000 TL

HACKER ve GUVENLIK REHBERI CD'SI

Hack ve Guvenlik konusunda bilmek istediginiz hersey, ihtiyaciniz olan her program bu cd'de. Sadece 15.000.000 TL ye bu cd'ye sahip olabilirsiniz! Siparis icin:

0546 599 64 54

Turkiye'de bilisim guvenligi alaninda bir ilki gerceklestirdik, ve sizlere icinde binlerce dokuman ve program bulunan "HACKER ve GUVENLIK REHBERI" cd'sini hazırladık. Bu cd'yi aldiginizda dis saldirilardan korunmak icin gerekli yazilimlari elde edecek, kendi guvenliginizi sagladiktan sonra ise hacker'ligin sirlarini ogrenecek, guvenlik icin neler gerekiyorsa sahip olacaksiniz.
  • Hackerlar nasil calisiyor, hangi programlari kullaniyor?
  • E-mail ve ICQ sifreleri nasil caliniyor, bunlardan nasıl korunmalı? 
  • Saldirilar nasil ve hangi programlarla yapiliyor?
  • Saldiri yontemleri ve bunlardan korunma yollari nelerdir?
  • Crack nedir, yöntemleri nelerdir?
  • Sifre çalma yontemleri ve sifrelerinizi koruma yollari nelerdir?
  • Firewall nedir, nasil kurulur, gerekli yazilimlar nelerdir?
  • Virus ve trojanlardan nasil korunulur?
  • Sistemlerdeki aciklar nelerdir, ve bu aciklar nasil kapatilir?

Bu ve bunun gibi bir cok soruya, bu cd'de cevap bulabileceksiniz. CD'de bulunan dokuman ve programlardan bazilarini asagida bulabilirsiniz:

  • Firewall programi + kurulum-kullanim kilavuzu (turkce)
  • Antivirus ve trojan programi + kurulum-kullanim kilavuzu (turkce)
  • Tamamen Turkce hack ve crack dokumanlari
  • Unlu "Hacker's Handbook" (Hackerlarin El Kitabi) CD'si, icindeki binlerce dokuman ve yazilim
  • Yuzlerce hack ve guvenlik programi
  • Binlerce hack ve guvenlik dokumani

ONEMLI NOT:CD icerisinde warez, crack ve illegal program kesinlikle bulunmamaktadir. CD icerisinde anlatilan bazi hack ve crack dokumanlarinin amaci, sadece bu tarz yontemleri tanimak, ve sistemi anlamaktir. Dusmandan en iyi sekilde korunmak icin oncelikle dusmani tanimak gerekir. Bu yontemlerin kotu amacli kullanimindan dogan zararlar ve tum sorumluluk tamamen kullaniciya aittir.

Listemizden çıkmak için lütfen tıklayınız

-- -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Ben | 1 Jan 2003 23:24

RE: am I missing something, or are permissions always preserved?

I'm not sure what POSIX calls for, but on both Linux and AIX (the two
unix OSes I have access to) I can leave off the mode arg when calling
open(2). Granted, doing so gives me a mode that normally isn't so good,
but in my case this would be fine, as I have samba forcing modes to be
what I want them to be.

However, after looking into this more, it turns out that samba
apparently causes chmod(2) to fail _only_ when trying to set modes
S_ISUID, S_ISGID, or S_ISVTX. Trying to set these modes in open(2), or
trying to set any other modes in open(2) or chmod(2), silently fails
without raising an error.

So while this might well be a samba problem, it could be avoided if
rsync behaved as I would expect it to. The original files do indeed have
S_ISGUID set on them, but I don't see why rsync should try to preserve
this if I didn't tell it to preserve permissions.

On Wed, 2003-01-01 at 07:13, Green, Paul wrote:
> Ben [mailto:bench <at> tukati.com]
> 
> > I'm relatively new to rsync, but it seems to me that if there's an
> > option to perserve permissions and you don't set it, then rsync
> > shouldn't do anything with permissions.
> 
> Sounds good, but recall how POSIX / Unix system calls work. To create a
> file, you have to specify what mode (permission) it should have.  There is
> no way to tell creat() or open() to "do the default thing."
> 
> I think a case could be made that this is a defect / incompatibility in the
> underlying file system layer that issues complaints about permissions.
> Before I attempted to code any kind of a fix, I'd sure want to read the
> specs of this layer and understand how the designers thought this problem
> should be approached.
> 
> Thanks
> PG
> --
> Paul Green, Senior Technical Consultant, Stratus Computer, Inc.
> Voice: +1 978-461-7557; FAX: +1 978-461-3610; Video on request.
> Speaking from Stratus not for Stratus

--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Dave Dykstra | 1 Jan 2003 23:44
Picon

Re: Simulating rdist?

See the BATCH MODE section in the rsync 2.5.5 man page.  It's stil pretty
new and experimental, so it may not do what you want, but currently it's the
best that rsync can do.

- Dave Dykstra

On Wed, Jan 01, 2003 at 04:39:06PM -0000, va_public <yahoogroups <at> vikas.mailshell.com> wrote:
> rsync is great for syncing 2 directory trees, but I want to maintain 
> a master source tree on one machine and copy that to multiple 
> machines. i.e. basically what rdist does
> 
> The only way I can see of doing this with rsync is to have multiple 
> cron jobs
> 
> 0 * * * * rsync ... machine1:...
> 0 * * * * rsync ... machine2:...
> ....and so on.
> 
> Is there a more elegant/compact way of doing this?
> 
> Thanks
> 
> -- 
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

tim_smithers | 2 Jan 2003 02:47
Picon

Not preserving permissions really preserves some


This appears to be a feature :-)

I'm running rsync 2.5.5 on Solaris 8, and testing transferring
files between two boxes with permission preservation turned *off*.

I have three files:

700 with permissions 700
770 with permissions 770
777 with permissions 770

The umask for the target system is set to: 007
[I have checked this via prints from the rsync code]

When the files get transferred, the permissions are:

700 -> permission 700
770 -> permission 770
777 -> permission 770

This retains the permissions from the group part of the file 700.
That is, even though my umask wants the group set, it doesn't
get set.

Why this is a problem for me:

I don't trust the source system to get the permissions correct
(it's a windows box running cygwin), and I want to force a set
of permissions so the process using the synched directory will
be able to access it (through group permissions).

Suggested solution:

I don't think changing the way permissions are created would be
that backward-compatible, so maybe a new option?

Create an option: --ignore-permissions

in receive_file_entry(), in filelist.c

========== code block ====================
if (!preserve_perms) {
    extern int orig_umask;
    /* set an appropriate set of permissions based on original
       permissions and umask. This emulates what GNU cp does */

       file->mode &= ~orig_umask;  <-- change this to line below

       file->mode = ((ignore_perms?0:0666) | file->mode) & ~orig_umask;
}

I used 0666 for the mask to pick up the execute bit (otherwise might
screw up creating directories we can go down).

I would be interested in any feedback on this problem from the maintainers.
If there is any agreement on how it might be addressed and included in a
new version, then I am happy to create all of the patch files and test it
for submission to a maintainer.

If any replies to the list could also cc my reply address, that would
be appreciated.

Regards,
    - Tim

The information contained in this e-mail communication may be confidential.
You should only read, disclose, re-transmit,copy, distribute, act in
reliance on or commercialise the information if you are authorised to do
so. If you are not the intended recipient of this e-mail communication,
please immediately notify us by e-mail to postmaster <at> mlc.com.au, or reply
by e-mail direct to the sender and then destroy any electronic and paper
copy of this message.

Any views expressed in this e-mail communication are those of the
individual sender, except where the sender specifically states them to be
the views of a member of the National Australia Bank Group of companies.

The National Australia Bank Group of companies does not represent, warrant
or guarantee that the integrity of this communication has been maintained
nor that the communication is free of errors, virus or interference.

--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

yahoogroups | 2 Jan 2003 03:09

Re: Simulating rdist?

--- Dave Dykstra <dwd.at.drdykstra.us <at> yahoogroups.at.vikas.mailshell.com>
wrote:
> See the BATCH MODE section in the rsync 2.5.5 man page.  It's stil pretty
> new and experimental, so it may not do what you want, but currently it's the
> best that rsync can do.

I dont quite understand. The man page mentions that it creates 4 files with
various rsync state information. 

How does this help me in propagating a src tree to N different machines?

Thanks

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Jos Backus | 2 Jan 2003 08:31

Re: Simulating rdist?

On Wed, Jan 01, 2003 at 06:09:53PM -0800, yahoogroups <at> vikas.mailshell.com wrote:
> --- Dave Dykstra <dwd.at.drdykstra.us <at> yahoogroups.at.vikas.mailshell.com>
> wrote:
> > See the BATCH MODE section in the rsync 2.5.5 man page.  It's stil pretty
> > new and experimental, so it may not do what you want, but currently it's the
> > best that rsync can do.
> 
> I dont quite understand. The man page mentions that it creates 4 files with
> various rsync state information. 
>
> How does this help me in propagating a src tree to N different machines?

These 4 files can be used on the remote systems to update the target tree
using the --read-batch option. This is more efficient because the transfer of
the diff information can happen in parallel (e.g. using multicast filetransfer
tools) and the source tree is only examined once instead of N times. Of
course, this only works if the target trees are not changed in any other way
than by using this method.

-- 
Jos Backus                       _/  _/_/_/      Sunnyvale, CA
                                _/  _/   _/
                               _/  _/_/_/
                          _/  _/  _/    _/
jos at catnook.com        _/_/   _/_/_/          require 'std/disclaimer'
--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Seth Olsen | 3 Jan 2003 00:02
Picon
Picon
Favicon

--copy-unsafe-links, links preserved in source tree or local directory?


Hi,

I'm a bit confused about what the '--copy-unsafe-links' option 
considers the 'source tree'.  In the man page it says that for links
pointing outside the 'source tree' the file will be copied, but when I
try this, for all links pointing outside of the local directory the
files are copied even though the links point to files that are in the
directory tree that is being rsynced.  I couldn't find anything definitive
on the web either. See the example below. 

Is this the expected behaviour? Is the 'source tree' just the 
current directory? If so, it would be nice to have an option where 
only links pointing outside of the 'parent source tree' 
('Test' in the example below) would be copied as files.

rsyc-2.5.4 on RedHat-7.3 i386, XFS filesystem

Thanks,

Seth
olsen <at> gps.caltech.edu

example:

chump0:~> ll Test/*
Test/Q1:
total 0
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:05 q1_1
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:05 q1_2
lrwxrwxrwx    1 olsen    olsen           4 Jan  2 14:06 q1_3 -> q1_2
lrwxrwxrwx    1 olsen    olsen          24 Jan  2 14:09 q1_4 -> /home/olsen/Test/Q2/q2_1 
lrwxrwxrwx    1 olsen    olsen          15 Jan  2 14:42 q1_5 -> ../../test/qw.F

Test/Q2:
total 0
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:06 q2_1
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:06 q2_2
lrwxrwxrwx    1 olsen    olsen           4 Jan  2 14:06 q2_3 -> q2_1
lrwxrwxrwx    1 olsen    olsen          10 Jan  2 14:06 q2_4 -> ../Q1/q1_1 
lrwxrwxrwx    1 olsen    olsen          10 Jan  2 14:06 q2_5 -> ../Q1/q1_3

chump0:~> rsync -rl --copy-unsafe-links Test Test2

chump0:~> ll Test2/Test/*
Test2/Test/Q1:
total 4.0k
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:48 q1_1
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:48 q1_2
lrwxrwxrwx    1 olsen    olsen           4 Jan  2 14:48 q1_3 -> q1_2
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:48 q1_4
-rw-rw-r--    1 olsen    olsen         275 Jan  2 14:48 q1_5

Test2/Test/Q2:
total 0
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:48 q2_1
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:48 q2_2
lrwxrwxrwx    1 olsen    olsen           4 Jan  2 14:48 q2_3 -> q2_1
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:48 q2_4
-rw-rw-r--    1 olsen    olsen           0 Jan  2 14:48 q2_5
--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Scott Mcdermott | 3 Jan 2003 00:24
Favicon

Re: --copy-unsafe-links, links preserved in source tree or local directory?

Seth Olsen on Thu  2/01 15:02 -0800:
> I'm a bit confused about what the '--copy-unsafe-links' option 
> considers the 'source tree'.  In the man page it says that for links
> pointing outside the 'source tree' the file will be copied,

I think it means, any link that points to a location whose parent dirs
don't eventually go back to the source dir.

> but when I try this, for all links pointing outside of the local
> directory the files are copied even though the links point to files
> that are in the directory tree that is being rsynced.

right, they are in the "source tree" so rsync copies them...you are
using `l' flag right?

> Is this the expected behaviour? Is the 'source tree' just the current
> directory?

rsync src dest
--

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html


Gmane