Re: Fwd: rsync and unlink permission

2002-10-28 Thread jw schultz
On Mon, Oct 28, 2002 at 03:12:53PM +0800, Patrick Hsieh wrote:
 
 Hello list,
 
 I have a apache documentroot with ownership root.www-data and mode 755
 Now I have a /var/www/index.html and chown'd that file to user foo. Sincen
 foo has no write permission under /var/www, he cannot rsync from remote
 server to the local filesystem because rsync will try to make temp file and
 unlink the original file before writing over it. Is there any solution to
 this problem?

This depends on OS, filesystem and mount options.  I'm
guessing (read the headers) you're running Linux (debian) so
this should work for you just fine.  I also assume that
foo is a member of the www-data group.

chmod +t,g+ws /var/www

The perms in ls -l should now read drwxrwsr-t.
At this point foo and other memebers of the www-data group
can create and delete their own files in /var/www.

You are correct that write permission is needed to create,
rename, and remove links in a directory.  Therefore you need
to grant write permission.

The sticky bit on the directory (t) means that only the file
owner can unlink or rename a file therein.  The file owner
will still have to have write permission on the directory.
/tmp should always have the sticky bit on.

Setting sgid (the s in drwxrwsr-t on the directory will
cause any files and directories created there to have
gid=www-data and the sgid will propigate to the
subdirectories created.  This way even if they put a file
there with 640 perms the web server (if in www-data) will
still be able to serve the pages.  rsync may override the
mode and group ownership but if you want to grant multiple
people write access sgid helps.  A filesystem mounted with
BSD semantics will behave this way even without sgid set.

PS.  A web tree doesn't belong in /var.  /var is for log
files, caches, and other temporary stuff.


-- 

J.W. SchultzPegasystems Technologies
email address:  [EMAIL PROTECTED]

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



Re:

2002-10-28 Thread Nitin Agarwal


Thanks for all the suggestions u gave...
After reading your mail and the site address that u had given, i feel
that there is NO WAY for installing Rsync as Service (as per the standards
given by MS) as of now.
I strongly support your proposal for rewriting Rsync for Windows Platforms
(not necessarily for 98 or similar versions but for NT based platforms)
in order to run the same as service or to have some module which can
assist the same.
Please let me know if i can be a contributor for the same (having in
depth knowledge of Networking protocols and standards).
Thanks
Nitin Agarwal
[EMAIL PROTECTED] wrote:

Howdy...

I guess I was clear enough before
on the topic, as you had to stretch your mind to see the underlying problem,
which I briefly touched upon.
The basic problem is that you have
an application that is not a Windows Service, but rather has been entered
into the Windows registry through the utilities that you have used, such
that it looks like a Windows service.
Here is the URL for NT Services,
which you may find helpful in developing a better understanding of what
a service is in Windows:
 http://msdn.microsoft.com/library/default.asp?url="/library/en-us/vbcon/html/vbconCreatingNTServiceApplications.asp


In this discussion, you will notice
that it references the use of templates which reference the appropriate
classes, namespaces, setting up the inheritence from the base class, and
more automatically service applications.
In your case, you appear to be using
utilities that allows you to install an application into the Microsoft
Services, but this does not make it a service, per se, as it does not conform
to the standards by which Microsoft has specified for designing services
for its platform.
My
proposal is to rewrite rsync for Windows 98, ME, NT, 2000, XP, and .NET,
such that it conforms to the standards for a service under the Microsoft
platform, as specified by Microsoft.
I have all of the current platforms
from Microsoft, excluding Windows 95, in addition to the support SDKs for
each platform, in addition to Microsoft Visual Studio 6.0 Professional,
Microsoft Visual Studio 6.0 Enterprise, and Microsoft Visual Studio .NET
Enterprise Architect.





















Re: Win32 Version? MODIFICATION NEEDED

2002-10-28 Thread Nitin Agarwal
Hi!!
There is one programming consideration which need to be programmed in RSYNC for
Windows..

PROBLEM

Whenever Rsync is installed as service on Windows Platform, the rsync
application gets terminated while logging off the server.

POSSIBLE SOLUTION
-
An Event Handler should be added in Rsync for windows binaries.: following
is the explanation for that:

For WIN32 applications (i.e. Rsync): when the currently logged-in user is
logging-off, all Console applications receive a CTRL_LOGOFF_EVENT event from the
Console.

If your Console application has registered a Console event handler (via
SetConsoleCtrlHandler), it must ignore CTRL_LOGOFF_EVENT in order to survive the
logoff.

_
Can we expect some help on this regard?
Thanks in Advance
Nitin Agarwal

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



Re: Win32 Version?

2002-10-28 Thread Max Bowsher
Nitin Agarwal [EMAIL PROTECTED] wrote:

 Hi
 I have used the rsync.exe (precompiled binary) from the net.
 I installed rsync as service in Windows NT server using SRVANY and
 INSTSRV.

I don't know whether it makes any difference or not, but if your rsync.exe
is Cygwin-based (and it must be, because there is no native Windows port),
then using Cygwin's own service tool (cygrunsrv) is probably a good idea.

Max.

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



Re: Win32 Version?

2002-10-28 Thread Nitin Agarwal
I dont think so.. because problem is not coming in service. In the service
manager control box, rsync service is running, but problem comes only once i
log off from the server. And as i mentioned in previous mails, the rsync.exe
process is also terminated after i log off. This may be something to do with
version... (i m using 2.1.1 and Bart told me that he is having no problems
with version 2.5.5)

Further i studied the problem, and concluded that this kind of problem always
comes when the application is not using any Console event handler (via
SetConsoleCtrlHandler) to ignore CTRL_LOGOFF_EVENT event.

This problem could have been addressed in further releases.

Thanks and Regards
Nitin Agarwal

Max Bowsher wrote:

 Nitin Agarwal [EMAIL PROTECTED] wrote:

  Hi
  I have used the rsync.exe (precompiled binary) from the net.
  I installed rsync as service in Windows NT server using SRVANY and
  INSTSRV.

 I don't know whether it makes any difference or not, but if your rsync.exe
 is Cygwin-based (and it must be, because there is no native Windows port),
 then using Cygwin's own service tool (cygrunsrv) is probably a good idea.

 Max.

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



Re: Fwd: rsync and unlink permission

2002-10-28 Thread Wayne Davison
On Mon, Oct 28, 2002 at 03:12:53PM +0800, Patrick Hsieh wrote:
 Since foo has no write permission under /var/www, he cannot rsync
 from remote server to the local filesystem because rsync will try to
 make temp file and unlink the original file before writing over it. Is
 there any solution to this problem?

See the -T (--temp-dir) option for how to tell rsync to put its temp
file in some other directory.  If the temp dir is on the same file
system as /var/www, rsync will still rename the new file over the top of
the old one (which insures that no one can request a partially-written
file).  If it is on a different file system, rsync will use its
copy_file() routine to copy the tmp file over the destination file.

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



Configuration

2002-10-28 Thread Armin Safarians
How do you restrict rsync transfers to only modules in the configuration 
file?
It seems like even though I have a module configured, users can transfer 
files
that they had permission to which is not under the directory of the 
module. EX. /etc/passwd...

Thanks,
AMS :-)

--

We all stand poised on the brink of greatness





WorldSecure Server safeway.com made the following
annotations on 10/28/02 11:22:11
--
Warning: 
All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient.  This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s).  If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited.  If you have received this message in error, please notify the sender immediately. 
 

==

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


Customer Response BUBSW

2002-10-28 Thread Johnny P.




  
 This
  message is an advertisement. We will continue to bring you valuable permission
  based messages on the products and services that interest you most unless
  you wish to decline.
  We process all requests immediately. Copyright 2000, 2001, 2002 all rights
  reserved. 
  




  
   
   
   
   
   
  

  
   
   
  
  
   
   
  
  
   
   
  
  
   
   
  
  
   
To
  reach millions of potential clients... 
  via newspapers, radio and television would cost a fortune. We can design
  and deliver your message or advertisement to the greatest number of potential
  prospects, resulting in the greatest number of sales, for a fraction of
  the cost of conventional advertising.
   
   
  
  
   
   
   
  



  
 This
  message is an advertisement. We will continue to bring you valuable permission
  based messages on the products and services that interest you most unless
  you wish to decline.
  We process all requests immediately. Copyright 2000, 2001, 2002 all rights
  reserved. 
  



  







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


Önce Sen Hasan

2002-10-28 Thread sp179











www.sp.org.tr


Demokratik bir çalışma olan
e-mailimizi okuduğunuz için teşekkür ederiz...





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


Fwd: Re: Fwd: rsync and unlink permission

2002-10-28 Thread Patrick Hsieh



 On Mon, Oct 28, 2002 at 03:12:53PM +0800, Patrick Hsieh wrote:
  Since foo has no write permission under /var/www, he cannot rsync
  from remote server to the local filesystem because rsync will try to
  make temp file and unlink the original file before writing over it. Is
  there any solution to this problem?

 See the -T (--temp-dir) option for how to tell rsync to put its temp
 file in some other directory.  If the temp dir is on the same file
 system as /var/www, rsync will still rename the new file over the top of
 the old one (which insures that no one can request a partially-written
 file).  If it is on a different file system, rsync will use its
 copy_file() routine to copy the tmp file over the destination file.

 ..wayne..

Hello,
My /var/www and /tmp are in different filesystem.


# df
Filesystem   1k-blocks  Used Available Use% Mounted on
/dev/hda3 37980892   3907128  34073764  11% /
/dev/hda191556  4988 86568   6% /boot
shmi:/var/www 37980892   1694152  36286740   5% /var/www


If I use -T /tmp, the error also occurres. Seems rsync will unlink the
original file before copy the new one over. Idea?

$ rsync -a -T /tmp home::www/pahudtestfile ./


unlink pahudtestfile: Permission denied
copy /tmp/.pahudtestfile.v4pXKW - pahudtestfile : Permission denied

$ rsync --version
rsync  version 2.5.6cvs  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
http://rsync.samba.org/
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
  IPv6, 64-bit system inums, 64-bit internal inums

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.



-- 
Patrick Hsieh[EMAIL PROTECTED]
GnuPG Pubilc Key at http://www.ezplay.tv/~pahud/pahudatezplay.pubkey
MD5 checksum: b948362c94655b74b33e859d58b8de91
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: rsync with large gzip files.

2002-10-28 Thread '[EMAIL PROTECTED]'
On Tue, Oct 29, 2002 at 12:12:04PM +0800, Leaw, Chern Jian wrote:
 The gzipped files have their sizes ranging from 250MB- 500MB. In the 17GB

When we refer to large file support it means files larger
than 2GB.

 You mentioned about issues with mount options in AIX and large file problems
 with HPs. I was wondering if you could provide some background to such
 problems which would be contributing to such problems? 

Look in the archives.

 Also, would the larger blocksize eliminate such problems with the large
 g-zipped files, hence there would not be a need to have version 2.5.5?

Your files aren't that large.  A larger blocksize may improve
performance and help avoid a completely unrelated issue.

If you want help with a bug you will need to ugrade.  Much
of the time when a bug is encountered on older versions it
has already been fixed.  Upgrading is likely to cause the
bug to disappear.  If you do have a bug you would need to
upgrade to current or CVS and build your own binaries in
order to apply the fix.


-- 

J.W. SchultzPegasystems Technologies
email address:  [EMAIL PROTECTED]

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