RE: cannot rsync when source directory lacks write permission

2012-08-10 Thread András Porjesz
Steven,
Of course, the destination side must have enough rights to achieve what I need, 
and an rsyncd running as root:root surely have all the necessary rights. So 
using --perms with this daemon must have been sufficient. But not, it is simply 
not true, because the daemon has a built-in assumption which overkills it.
I know rsync sends its command line parameters to the daemon, so rsyncd could 
have been able to handle the case, but instead of recognizing the flag it 
simply makes that assumption.

I think all the permission/ownership handling is complicated (unaccountable, 
puzzling, peculiar) and the usage is confusing and annoying, it should be 
reworked in a much more consistent way:

1. use exactly the same options on both sides
2. specify which attributes to transfer (keep) and which ones to set explicitly 
(including permissions, ownership, time and probably acl also)
3. define defaults
4. define a precedence (like: source filesystem, sender config, receiver 
config, receiver user rights, defaults)
5. describe actions taken in case of insufficient rights

(just another example: client side -E, server side incoming chmod u+x,g-x and 
outgoing chmod u+x,g-x: what is the expected result when sending or receiving 
files?)

Using aliases these can be mapped to the actual flags - for backward 
compatibility

Andras

-Original Message-
From: rsync-boun...@lists.samba.org [mailto:rsync-boun...@lists.samba.org] On 
Behalf Of Steven Levine
Sent: Thursday, August 09, 2012 21:37
To: rsync@lists.samba.org
Subject: RE: cannot rsync when source directory lacks write permission

In
64fab8215d47a944abdf7de50a3406a219c2dac...@esesscms0353.eemea.ericsson.se,
on 08/09/12
   at 07:54 AM, András Porjesz andras.porj...@ericsson.com said:

Hi,

Thanks, it looks ok, just it is not documented anywhere:

From the ryncd.conf man page

   uidThis  parameter  specifies the user name or user ID
  that file transfers to and from that module  should
  take  place  as when the daemon was run as root. In
  combination with the gid parameter this  determines
  what file permissions are available. The default is
  uid -2, which is normally the user nobody.

it overwrites
the -perms flag on the other side.

Not really.  Se below.

So read documentation, it is
definitely against it: In summary: to give destination files (both old 
and new) the source permissions, use --perms.

I assume you are referring to the rsync man page which says

   -p, --perms
  This option causes the receiving rsync to  set  the
  destination  permissions  to  be  the  same  as the
  source permissions.  (See also the  --chmod  option
  for  a way to modify what rsync considers to be the
  source permissions.)

What it does not say is that the receiving side needs sufficient permissions to 
be able to change the permissions.  I guess the man page authors assumed that 
someone running rsync on *ix would understand this implicitly.  Running the 
receiving side as root is one option for ensuring that the receiver can change 
permissions.  There are others that are more secure.

Running the receiver as the default nobody user does not turn off --perms, it 
simply ensures that the attempt to change permissions is very likely to fail.  
One way to make it not fail is to have the module root owned by nobody.

Regards,

Steven

--
--
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: cannot rsync when source directory lacks write permission

2012-08-10 Thread Voelker, Bernhard
András Porjesz wrote (Friday, August 10, 2012 9:27 AM):

 I think all the permission/ownership handling is complicated
 (unaccountable, puzzling, peculiar) and the usage is confusing
 and annoying

I think you didn't get Steven's point:

  [...] The default is
  uid -2, which is normally the user nobody.

I.e. even if your rsyncd is running as root, it drops it's
priviledges by default by becoming 'nobody'.

That is a pre-cautious security issue which meets the 
requirements for most installations which just serve
files read-only.

When you want to push things there, then you might either
rsync-via-ssh to that server as root (or sudo there), or
set 'uid' to root in rsyncd.conf.

Have a nice day,
Berny

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: cannot rsync when source directory lacks write permission

2012-08-10 Thread András Porjesz
Hi Berny,
Yes, it is a possible solution, I missed something. But from my point of view 
you did not get my point. 
I worked with unix/linux for 20 years therefore I know what are you talking 
about. In some cases using nobody is acceptable or even preferred, but in the 
specified case it is still an annoying and confusing bug. If you would like to 
say: this is not user friendly at all, and furthermore the documentation is not 
clear enough, misinterpretable (it is not mentioned anywhere: the cliend side 
settings or server side settings or some default assumptions have priority). My 
assumtion was defaults only used when required, but as I wrote already, rsyncd 
overkills client side settings.

You tried to explain nobody is normal as default - and I accept it, I tried to 
explain overwriting/ignoring -perms is a bug...

András

-Original Message-
From: Voelker, Bernhard [mailto:bernhard.voel...@siemens-enterprise.com] 
Sent: Friday, August 10, 2012 10:01
To: András Porjesz; Steven Levine; rsync@lists.samba.org
Subject: RE: cannot rsync when source directory lacks write permission

András Porjesz wrote (Friday, August 10, 2012 9:27 AM):

 I think all the permission/ownership handling is complicated 
 (unaccountable, puzzling, peculiar) and the usage is confusing and 
 annoying

I think you didn't get Steven's point:

  [...] The default is
  uid -2, which is normally the user nobody.

I.e. even if your rsyncd is running as root, it drops it's priviledges by 
default by becoming 'nobody'.

That is a pre-cautious security issue which meets the requirements for most 
installations which just serve files read-only.

When you want to push things there, then you might either rsync-via-ssh to that 
server as root (or sudo there), or set 'uid' to root in rsyncd.conf.

Have a nice day,
Berny

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: cannot rsync when source directory lacks write permission

2012-08-10 Thread Steven Levine
In
64fab8215d47a944abdf7de50a3406a219c2dac...@esesscms0353.eemea.ericsson.se,
on 08/10/12
   at 09:27 AM, András Porjesz andras.porj...@ericsson.com said:

Hi András,

We may have to agree to disagree on some of this...

Of course, the destination side must have enough rights to achieve what I
need, and an rsyncd running as root:root surely have all the necessary
rights. So using --perms with this daemon must have been sufficient.

No, it's not the way it works and not the way I would want it to work.  I
do not want the server to automatically assume that the client can be
trusted to do the right thing with data that is owned by the server.

The fact that the rsync daemon is running as root is irrelevant.  As you
know from your many years of *ix experience, it is normal for a
application running as root to use setuid to limit the rights it has.  In
my experience, it is typical for a server to do setuid nobody, unless
instructed otherwise.

But not, it is simply not true, because the daemon has a built-in
assumption which overkills it. I know rsync sends its command line
parameters to the daemon, so rsyncd could have been able to handle the
case, but instead of recognizing the flag it simply makes that
assumption.

The assumption it makes is that the rsyncd.conf is correct when there is a
choice to be made.  This make absolutely good sense to me since in my
world, the server knows what's best and the client is less trusted.

1. use exactly the same options on both sides

This already happens.  What does not happen is that the server does not
automatically run as root.

2. specify which attributes to transfer (keep) and which ones to set
explicitly (including permissions, ownership, time and probably acl also)

This already happens.  It is the client's responsibility to do this.  The
server will do it's best to fulfill the request.  Failures can and will
occur it the client asks the server to do something that exceeds its
rights or is something the platform does not support.  For example, I
maintain an rsync port for a platform that does not support hard links. 
There's a whole set of client options that generate errors if the client
requests them.

4. define a precedence (like: source filesystem, sender config, receiver
config, receiver user rights, defaults) 5. describe actions taken in case
of insufficient rights

Most of this is already in place.  If the server has insufficient rights
the request will fail in some way and rsync will proceed, depending on
options such as --ignore-errors.

(just another example: client side -E, server side incoming chmod u+x,g-x
and outgoing chmod u+x,g-x: what is the expected result when sending or
receiving files?)

As the man page says

snip
o  To  make  a  file executable, rsync turns on
   each x permission that has a corresponding r
   permission enabled.

If --perms is enabled, this option is ignored.
/snip

Using aliases these can be mapped to the actual flags - for backward
compatibility

Huh?

Steven

-- 
--
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: cannot rsync when source directory lacks write permission

2012-08-09 Thread Steven Levine
In
64fab8215d47a944abdf7de50a3406a219c2dac...@esesscms0353.eemea.ericsson.se,
on 08/09/12
   at 07:54 AM, András Porjesz andras.porj...@ericsson.com said:

Hi,

Thanks, it looks ok, just it is not documented anywhere:

From the ryncd.conf man page

   uidThis  parameter  specifies the user name or user ID
  that file transfers to and from that module  should
  take  place  as when the daemon was run as root. In
  combination with the gid parameter this  determines
  what file permissions are available. The default is
  uid -2, which is normally the user nobody.

it overwrites
the -perms flag on the other side.

Not really.  Se below.

So read documentation, it is
definitely against it: In summary: to give destination files (both old
and new) the source permissions, use --perms.

I assume you are referring to the rsync man page which says

   -p, --perms
  This option causes the receiving rsync to  set  the
  destination  permissions  to  be  the  same  as the
  source permissions.  (See also the  --chmod  option
  for  a way to modify what rsync considers to be the
  source permissions.)

What it does not say is that the receiving side needs sufficient
permissions to be able to change the permissions.  I guess the man page
authors assumed that someone running rsync on *ix would understand this
implicitly.  Running the receiving side as root is one option for ensuring
that the receiver can change permissions.  There are others that are more
secure.

Running the receiver as the default nobody user does not turn off --perms,
it simply ensures that the attempt to change permissions is very likely to
fail.  One way to make it not fail is to have the module root owned by
nobody.

Regards,

Steven

-- 
--
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: cannot rsync when source directory lacks write permission

2012-08-08 Thread András Porjesz
Hi Steven,
In my case rsyncd runs as root, so it must have right to do the job. Rsync 
started with -p, but the daemon could not write into the destination area, 
because the [newly created] directories were owned by nobody and other had 
no right to write into it. The solution (workaround) was to add this line to 
the config of the daemon: uid=root. I have no any idea why it works, why it has 
any effect at all and why it was not documented if it was required to use 
--perms.

Andras

-Original Message-
From: rsync-boun...@lists.samba.org [mailto:rsync-boun...@lists.samba.org] On 
Behalf Of Steven Levine
Sent: Wednesday, August 08, 2012 00:16
To: rsync@lists.samba.org
Subject: Re: cannot rsync when source directory lacks write permission

In CAFUyVX4O-o=r36MA0sMfhMMiPZSurLg3V0Z=qx_v1bz099g...@mail.gmail.com,
on 08/07/12
   at 01:03 PM, Greg Deback (rsync) greg.deb+rs...@gmail.com said:


Hi,


No I think this bug is not related. However, I am wondering : if the 
directory is write-protected, even for root, that means it never 
changes right ?

No.  As the code says

/* We need to ensure that the dirs in the transfer have both
 * readable and writable permissions during the time we are
 * putting files within them.  This is then restored to the
 * former permissions after the transfer is done. */

If András can not create files and/or dirctories at the destination, it is 
because the directory does not already have the required read/write permissions 
or the rsync daemon does not have the authority to change the permissions.

Regards,

Steven

--
--
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: cannot rsync when source directory lacks write permission

2012-08-08 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

It is because you didn't read the documentation.

When you run rsyncd as root it drops privileges to use nobody unless
you tell it to do otherwise.

On 08/08/12 02:29, András Porjesz wrote:
 Hi Steven, In my case rsyncd runs as root, so it must have right to
 do the job. Rsync started with -p, but the daemon could not write
 into the destination area, because the [newly created] directories
 were owned by nobody and other had no right to write into it.
 The solution (workaround) was to add this line to the config of the
 daemon: uid=root. I have no any idea why it works, why it has any
 effect at all and why it was not documented if it was required to
 use --perms.
 
 Andras
 
 -Original Message- From: rsync-boun...@lists.samba.org
 [mailto:rsync-boun...@lists.samba.org] On Behalf Of Steven Levine 
 Sent: Wednesday, August 08, 2012 00:16 To: rsync@lists.samba.org 
 Subject: Re: cannot rsync when source directory lacks write
 permission
 
 In
 CAFUyVX4O-o=r36MA0sMfhMMiPZSurLg3V0Z=qx_v1bz099g...@mail.gmail.com,

 
on 08/07/12
 at 01:03 PM, Greg Deback (rsync) greg.deb+rs...@gmail.com
 said:
 
 
 Hi,
 
 
 No I think this bug is not related. However, I am wondering : if
 the directory is write-protected, even for root, that means it
 never changes right ?
 
 No.  As the code says
 
 /* We need to ensure that the dirs in the transfer have both *
 readable and writable permissions during the time we are * putting
 files within them.  This is then restored to the * former
 permissions after the transfer is done. */
 
 If András can not create files and/or dirctories at the
 destination, it is because the directory does not already have the
 required read/write permissions or the rsync daemon does not have
 the authority to change the permissions.
 
 Regards,
 
 Steven
 
 -- 
 --

 
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
 www.scoug.com www.ecomstation.com 
 --

  -- Please use reply-all for most replies to avoid omitting the
 mailing list. To unsubscribe or change options:
 https://lists.samba.org/mailman/listinfo/rsync Before posting,
 read: http://www.catb.org/~esr/faqs/smart-questions.html

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAio0kACgkQVKC1jlbQAQeqtQCg2iJf8hZirc6NqiCzSwBxvoaD
tCQAoNhHpcr1wvx+2BLpODu6qxKiw5Vx
=6RSR
-END PGP SIGNATURE-
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: cannot rsync when source directory lacks write permission

2012-08-08 Thread András Porjesz
Hi,
Thanks, it looks ok, just it is not documented anywhere: it overwrites the 
-perms flag on the other side. So read documentation, it is definitely against 
it:
In summary: to give destination files (both old and new) the source 
permissions, use --perms.

Andras

-Original Message-
From: rsync-boun...@lists.samba.org [mailto:rsync-boun...@lists.samba.org] On 
Behalf Of Kevin Korb
Sent: Wednesday, August 08, 2012 19:35
To: rsync@lists.samba.org
Subject: Re: cannot rsync when source directory lacks write permission

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

It is because you didn't read the documentation.

When you run rsyncd as root it drops privileges to use nobody unless you tell 
it to do otherwise.

On 08/08/12 02:29, András Porjesz wrote:
 Hi Steven, In my case rsyncd runs as root, so it must have right to do 
 the job. Rsync started with -p, but the daemon could not write into 
 the destination area, because the [newly created] directories were 
 owned by nobody and other had no right to write into it.
 The solution (workaround) was to add this line to the config of the
 daemon: uid=root. I have no any idea why it works, why it has any 
 effect at all and why it was not documented if it was required to use 
 --perms.
 
 Andras
 
 -Original Message- From: rsync-boun...@lists.samba.org 
 [mailto:rsync-boun...@lists.samba.org] On Behalf Of Steven Levine
 Sent: Wednesday, August 08, 2012 00:16 To: rsync@lists.samba.org
 Subject: Re: cannot rsync when source directory lacks write permission
 
 In
 CAFUyVX4O-o=r36MA0sMfhMMiPZSurLg3V0Z=qx_v1bz099g...@mail.gmail.com,

 
on 08/07/12
 at 01:03 PM, Greg Deback (rsync) greg.deb+rs...@gmail.com
 said:
 
 
 Hi,
 
 
 No I think this bug is not related. However, I am wondering : if the 
 directory is write-protected, even for root, that means it never 
 changes right ?
 
 No.  As the code says
 
 /* We need to ensure that the dirs in the transfer have both * 
 readable and writable permissions during the time we are * putting 
 files within them.  This is then restored to the * former permissions 
 after the transfer is done. */
 
 If András can not create files and/or dirctories at the destination, 
 it is because the directory does not already have the required 
 read/write permissions or the rsync daemon does not have the authority 
 to change the permissions.
 
 Regards,
 
 Steven
 
 --
 --

 
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
 www.scoug.com www.ecomstation.com
 --

  -- Please use reply-all for most replies to avoid omitting the 
 mailing list. To unsubscribe or change options:
 https://lists.samba.org/mailman/listinfo/rsync Before posting,
 read: http://www.catb.org/~esr/faqs/smart-questions.html

- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAio0kACgkQVKC1jlbQAQeqtQCg2iJf8hZirc6NqiCzSwBxvoaD
tCQAoNhHpcr1wvx+2BLpODu6qxKiw5Vx
=6RSR
-END PGP SIGNATURE-
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: cannot rsync when source directory lacks write permission

2012-08-07 Thread András Porjesz
Hi,
Probably it is related to this bug: 
https://bugzilla.samba.org/show_bug.cgi?id=8844
Andras

-Original Message-
From: rsync-boun...@lists.samba.org [mailto:rsync-boun...@lists.samba.org] On 
Behalf Of Steven Levine
Sent: Friday, July 27, 2012 20:15
To: rsync@lists.samba.org
Subject: Re: cannot rsync when source directory lacks write permission

In juuivm$ai5$1...@dough.gmane.org, on 07/27/12
   at 01:26 PM, Brian J. Murrell br...@interlinx.bc.ca said:

Hi,

I seem to be running into a problem where I am trying to rsync from a 
source directory that lacks write permissions (i.e. r-xr-xr-x).
Presumably this is because rsync creates the directory on the 
destination, then sets the permissions to match the source and then 
tries to sync the contents of the directory, which it cannot of course 
lacking write permission in the directory.

Rsync contains code to handle this.  What version of rsync are you running and 
what is the command line you are using and what is the exact error message you 
are getting?

Regards,

Steven

--
--
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: cannot rsync when source directory lacks write permission

2012-08-07 Thread Greg Deback (rsync)
Hi,

No I think this bug is not related. However, I am wondering : if the
directory is write-protected, even for root, that means it never changes
right ? or is it that there is no file creation, only updates ? In either
case, the better would be to treat this particular directory separately.
Suppose this directory is called secure, you would create a secure
folder on the destination, with a chmod +w, then do :
rsync $SRC $DST -x secure\*
rsync $SRC/secure $DST/secure/

Greg

On Tue, Aug 7, 2012 at 7:57 AM, András Porjesz
andras.porj...@ericsson.comwrote:

 Hi,
 Probably it is related to this bug:
 https://bugzilla.samba.org/show_bug.cgi?id=8844
 Andras

 -Original Message-
 From: rsync-boun...@lists.samba.org [mailto:rsync-boun...@lists.samba.org]
 On Behalf Of Steven Levine
 Sent: Friday, July 27, 2012 20:15
 To: rsync@lists.samba.org
 Subject: Re: cannot rsync when source directory lacks write permission

 In juuivm$ai5$1...@dough.gmane.org, on 07/27/12
at 01:26 PM, Brian J. Murrell br...@interlinx.bc.ca said:

 Hi,

 I seem to be running into a problem where I am trying to rsync from a
 source directory that lacks write permissions (i.e. r-xr-xr-x).
 Presumably this is because rsync creates the directory on the
 destination, then sets the permissions to match the source and then
 tries to sync the contents of the directory, which it cannot of course
 lacking write permission in the directory.

 Rsync contains code to handle this.  What version of rsync are you running
 and what is the command line you are using and what is the exact error
 message you are getting?

 Regards,

 Steven

 --
 --
 Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
 www.scoug.com www.ecomstation.com
 --

 --
 Please use reply-all for most replies to avoid omitting the mailing list.
 To unsubscribe or change options:
 https://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
 --
 Please use reply-all for most replies to avoid omitting the mailing list.
 To unsubscribe or change options:
 https://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

RE: cannot rsync when source directory lacks write permission

2012-08-07 Thread Steven Levine
In
64fab8215d47a944abdf7de50a3406a219c2cfb...@esesscms0353.eemea.ericsson.se,
on 08/07/12
   at 07:57 AM, András Porjesz andras.porj...@ericsson.com said:

Hi,

Probably it is related to this bug:
https://bugzilla.samba.org/show_bug.cgi?id=8844

Well, this behavior is not a bug.  It is the way rsync works.  If a
transfer runs as nobody, it's not going to be able to create much of
anything on most setups.  Running as nobody is typically used for
anonymous rsync servers that need only read permission to the files in the
module.

Steven

-- 
--
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: cannot rsync when source directory lacks write permission

2012-08-07 Thread Steven Levine
In CAFUyVX4O-o=r36MA0sMfhMMiPZSurLg3V0Z=qx_v1bz099g...@mail.gmail.com,
on 08/07/12
   at 01:03 PM, Greg Deback (rsync) greg.deb+rs...@gmail.com said:


Hi,


No I think this bug is not related. However, I am wondering : if the
directory is write-protected, even for root, that means it never changes
right ?

No.  As the code says

/* We need to ensure that the dirs in the transfer have both
 * readable and writable permissions during the time we are
 * putting files within them.  This is then restored to the
 * former permissions after the transfer is done. */

If András can not create files and/or dirctories at the destination, it is
because the directory does not already have the required read/write
permissions or the rsync daemon does not have the authority to change the
permissions.

Regards,

Steven

-- 
--
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


cannot rsync when source directory lacks write permission

2012-07-27 Thread Brian J. Murrell
I seem to be running into a problem where I am trying to rsync from a
source directory that lacks write permissions (i.e. r-xr-xr-x).
Presumably this is because rsync creates the directory on the
destination, then sets the permissions to match the source and then
tries to sync the contents of the directory, which it cannot of course
lacking write permission in the directory.

Is there a way to have rsync first sync a directory and then set the
permissions to match the source?  Of course, this needs to be done
recursively so that permissions are set as rsync ascends back up the
directory tree.

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: cannot rsync when source directory lacks write permission

2012-07-27 Thread josephj
Is rsync being run with root privileges for the destination?

 I seem to be running into a problem where I am trying to rsync from a
 source directory that lacks write permissions (i.e. r-xr-xr-x).
 Presumably this is because rsync creates the directory on the
 destination, then sets the permissions to match the source and then
 tries to sync the contents of the directory, which it cannot of course
 lacking write permission in the directory.

 Is there a way to have rsync first sync a directory and then set the
 permissions to match the source?  Of course, this needs to be done
 recursively so that permissions are set as rsync ascends back up the
 directory tree.

 Cheers,
 b.

 --
 Please use reply-all for most replies to avoid omitting the mailing list.
 To unsubscribe or change options:
 https://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: cannot rsync when source directory lacks write permission

2012-07-27 Thread Steven Levine
In juuivm$ai5$1...@dough.gmane.org, on 07/27/12
   at 01:26 PM, Brian J. Murrell br...@interlinx.bc.ca said:

Hi,

I seem to be running into a problem where I am trying to rsync from a
source directory that lacks write permissions (i.e. r-xr-xr-x).
Presumably this is because rsync creates the directory on the
destination, then sets the permissions to match the source and then tries
to sync the contents of the directory, which it cannot of course lacking
write permission in the directory.

Rsync contains code to handle this.  What version of rsync are you running
and what is the command line you are using and what is the exact error
message you are getting?

Regards,

Steven

-- 
--
Steven Levine stev...@earthlink.net  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
--

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html