tar permission errors when copying directories to a server

Mirko Vukovic mirko.vukovic@gmail.com
Wed Aug 11 17:09:00 GMT 2010


Hello,

I use tar to backup my files to a server using a command

>    tar  cf - . --exclude-from=./.backup-exclude | (cd "$dest_dir"; tar xvf -) > "$log_file"

After finally upgrading to 1.7, I started getting the following errors:

tar: ./dir-name1: Cannot change mode to rwx-w--w-: Permission denied
tar: ./dir-name2: Cannot change mode to rwx-w--w-: Permission denied
tar: .: Cannot change mode to rwxrw-rw-: Permission denied
tar: Exiting with failure status due to previous errors
tar exited with error status 1 on  Wed Aug 11 12:56:39 EDT 2010

Irrespective of these errors, tar does copy all the files.  The
problem is that I use the exit status to check whether the backup
succeeded or not and whether to reset the time-stamp file.  So, the
error status is important to me.

I tried the same script to copy files from one location to another on
my machine, and it works without errors.

I am guessing that the problem has something to do with permissions on
the server.  How would I go about fixing those?

Thank you,

Mirko

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list