LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2014, 04:34 PM   #1
ktf
LQ Newbie
 
Registered: Apr 2009
Distribution: Kubuntu
Posts: 9

Rep: Reputation: 0
RSync directory permissions not changable


Hi,

I been trying to back-up some data using rsync, but for some rather weird reason any copied directories always get a 700 permission, instead of the 755 that he originals have. I've tried a lot of different combinations of command line options on rsync and various options in rsyncd.conf, but I always get this.

For example, if I try using --chmod on rsync or outgoing chmod on rsyncd.conf, the permissions of files get changed, but for directories, nothing happens. Using --chmod=Do+x doesn't do anything for example.

Anyone who knows what is happening? I can't seem to find the cause. I'm using Ubuntu 13.10.
 
Old 04-12-2014, 07:06 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
It would help if you gave the full command you're using for rsync. For instance, I preserve permissions using the following rsync command.

Code:
rsync -av ./src/ ./dst/
Man page explains -a.

You should also mention the type of file system you're attempting to write. For example, FAT has umask, dmask, and fmask mount options which will force any files/directories created on that filesystem to adhere to those permissions. Many network filesystems (for example NFS) also support umask. More details are needed to help you troubleshoot. See the mount man page for what mount options are supported for which filesystems.
  • What type of filesystem is the source?
  • What type of filesystem is the destination?
  • What are the mount options the filesystem you're attempting to write (destination)?
 
Old 04-13-2014, 02:42 AM   #3
ktf
LQ Newbie
 
Registered: Apr 2009
Distribution: Kubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Hi,

I tried quite a few things, but it was mostly

Code:
rsync -a localhost::target .
and
Code:
rsync -a --chmod=Da+rwx locahost::target .
I copied from localhost just to get this problem isolated, but the actual problems are with an rsync-client embedded into a NAS, of which I don't know the options used. Still, the fact that the above gives directory permissions Drwx------ is something I don't understand.

For the server side I've tried various things, like use chroot = yes and use chroot = no, changing uid and gid (which gives permission errors), fake super = yes doesn't seem to do anything either, outgoing chmod doesn't do anything (on directories, it does on files however)...

Filesystem is ext4, for both server and client in this case. I don't know about the filesystem of the NAS, but I'd rather like to get this fixed locally, I think that might solve the issue on the NAS as well.

Any idea what might be happening?

Last edited by ktf; 04-13-2014 at 02:45 AM.
 
Old 04-13-2014, 11:26 AM   #4
ktf
LQ Newbie
 
Registered: Apr 2009
Distribution: Kubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Okay, I think I might have isolated the problem.

If an rsync transfer starts, the client creates all directories from the file list with drwx---------. At some point during the transfer, the client asks the server for the real permissions of the directory, and changes them accordingly. However, if the tranfer is stopped at some point and later resumed, the client does not change the permissions (because the timestamp on the client side is newer) and the permissions stay the wrong way.

Is there anything I can do about this except deleting everything on the client side and starting anew or updating the timestamps at the server side?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl -> Get changable path ab52 Programming 1 02-20-2012 04:55 AM
Changing permissions of destination directory after rsync cliff123 Linux - General 1 12-26-2007 03:09 AM
Locale not changable tAgC SUSE / openSUSE 4 02-27-2007 05:25 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration