Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: rsync over ssh passwordless - please assist with helping me set this up properly

  1. #11
    Join Date
    Feb 2011
    Location
    Maryland
    Beans
    2,251

    Re: rsync over ssh passwordless - please assist with helping me set this up properly

    Quote Originally Posted by greavette View Post
    collisionystm, I have tried to copy the entire key from my source to destination servers, but I'm not sure how best to do this. I connect to these servers using putty (the servers are a VM on a Windows CP host). I'm not familiar with vi so I'm trying to copy then entire key using nano but I can't copy the key using putty. Is there specific instructions I should follow to copy these keys?



    RyanRahl, here are my permissions from both my source and destinatation folders. I agree that once I fix my permissions, this problem should be corrected.

    Source:
    Code:
    root@Source:/usr/local/citadel$ ls -l
    total 4532
    -rwxr-xr-x  1 root    root     227240 2011-10-19 14:59 aidepost
    -rwxr-xr-x  1 root    root      16699 2011-10-19 14:59 base64
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 bio
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 bitbucket
    -rwxr-xr-x  1 root    root     222310 2011-10-19 14:59 chkpw
    -rwxr-xr-x  1 root    root      10005 2011-10-19 14:59 chkpwd
    -rwxr-xr-x  1 root    root     535837 2011-10-19 14:59 citadel
    -rw-------  1 citadel citadel    3228 2011-10-24 12:08 citadel.config
    -rw-------  1 citadel root         32 2011-10-24 12:08 citadel.control
    -rw-r--r--  1 root    root         41 2011-10-19 14:59 citadel-easyinstall.sum
    -rw-r--r--  1 root    root      14776 2011-10-19 14:59 citadel.rc
    -rw-r--r--  1 root    root       2039 2011-10-19 14:59 citadel.schema
    srwxrwsrwx  1 root    root          0 2011-10-24 12:08 citadel.socket
    -rw-r--r--  1 root    root        617 2011-10-19 14:59 citadel_urlshorteners.rc
    -rwxr-xr-x  1 root    root     223152 2011-10-19 14:59 citmail
    -rwxr-xr-x  1 root    root    1518737 2011-10-19 14:59 citserver
    -rwxr-xr-x  1 root    root     224753 2011-10-19 14:59 ctdlmigrate
    drwx------  2 citadel root       4096 2011-10-19 15:04 data
    -rwxr-xr-x  1 root    root       3138 2011-10-19 14:59 database_cleanup.sh
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 docs
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 files
    -rw-r--r--  1 root    root       2299 2011-10-19 14:59 funambol_newmail_soap.xml
    -rwxr-xr-x  1 root    root     314516 2011-10-19 14:59 getmail
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 help
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 images
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 info
    srwxrwsrwx  1 root    root          0 2011-10-24 12:08 lmtp.socket
    srwxrwsrwx  1 root    root          0 2011-10-24 12:08 lmtp-unfiltered.socket
    drwxr-xr-x 13 root    root       4096 2011-10-19 14:59 locale
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 messages
    -rwxr-xr-x  1 root    root        860 2011-10-19 14:59 migrate_aliases.sh
    -rwxr-xr-x  1 root    root      16407 2011-10-19 14:59 msgform
    drwxr-xr-x  6 citadel root       4096 2011-10-19 15:04 network
    -rw-r--r--  1 root    root        138 2011-10-19 14:59 notify_about_newmail.js
    -rw-r--r--  1 root    root        279 2011-10-19 14:59 public_clients
    -rw-r--r--  1 root    root        488 2011-10-19 14:59 README.txt
    -rw-r--r--  1 root    root       5689 2011-10-19 14:59 rfc2739.schema
    -rwxr-xr-x  1 root    root     313350 2011-10-19 14:59 sendcommand
    -rwxr-xr-x  1 root    root     257152 2011-10-19 14:59 setup
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 techdoc
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 unstripped
    -rwxr-xr-x  1 root    root     300470 2011-10-19 14:59 userlist
    drwxr-xr-x  2 root    root       4096 2011-10-19 14:59 userpics
    -rwxr-xr-x  1 root    root     304599 2011-10-19 14:59 whobbs
    Destination:

    Code:
    root@destination:/usr/local/citadel# ls -l
    total 4532
    -rwxr-xr-x  1 root    root     227240 2011-10-24 08:58 aidepost
    -rwxr-xr-x  1 root    root      16703 2011-10-24 08:58 base64
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 bio
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 bitbucket
    -rwxr-xr-x  1 root    root     222310 2011-10-24 08:58 chkpw
    -rwxr-xr-x  1 root    root      10005 2011-10-24 08:58 chkpwd
    -rwxr-xr-x  1 root    root     535841 2011-10-24 08:58 citadel
    -rw-------  1 citadel citadel    3228 2011-10-24 08:59 citadel.config
    -rw-------  1 citadel root         32 2011-10-24 08:59 citadel.control
    -rw-r--r--  1 root    root         41 2011-10-24 08:58 citadel-easyinstall.sum
    -rw-r--r--  1 root    root      14776 2011-10-24 08:58 citadel.rc
    -rw-r--r--  1 root    root       2039 2011-10-24 08:58 citadel.schema
    srwxrwsrwx  1 root    root          0 2011-10-24 08:59 citadel.socket
    -rw-r--r--  1 root    root        617 2011-10-24 08:58 citadel_urlshorteners.rc
    -rwxr-xr-x  1 root    root     223152 2011-10-24 08:58 citmail
    -rwxr-xr-x  1 root    root    1518737 2011-10-24 08:58 citserver
    -rwxr-xr-x  1 root    root     224753 2011-10-24 08:58 ctdlmigrate
    drwx------  2 citadel root       4096 2011-10-24 08:59 data
    -rwxr-xr-x  1 root    root       3138 2011-10-24 08:58 database_cleanup.sh
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 docs
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 files
    -rw-r--r--  1 root    root       2299 2011-10-24 08:58 funambol_newmail_soap.xml
    -rwxr-xr-x  1 root    root     314516 2011-10-24 08:58 getmail
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 help
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 images
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 info
    srwxrwsrwx  1 root    root          0 2011-10-24 08:59 lmtp.socket
    srwxrwsrwx  1 root    root          0 2011-10-24 08:59 lmtp-unfiltered.socket
    drwxr-xr-x 13 root    root       4096 2011-10-24 08:58 locale
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 messages
    -rwxr-xr-x  1 root    root        860 2011-10-24 08:58 migrate_aliases.sh
    -rwxr-xr-x  1 root    root      16407 2011-10-24 08:58 msgform
    drwxr-xr-x  6 citadel root       4096 2011-10-24 08:59 network
    -rw-r--r--  1 root    root        138 2011-10-24 08:58 notify_about_newmail.js
    -rw-r--r--  1 root    root        279 2011-10-24 08:58 public_clients
    -rw-r--r--  1 root    root        488 2011-10-24 08:58 README.txt
    -rw-r--r--  1 root    root       5689 2011-10-24 08:58 rfc2739.schema
    -rwxr-xr-x  1 root    root     313350 2011-10-24 08:58 sendcommand
    -rwxr-xr-x  1 root    root     257152 2011-10-24 08:58 setup
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 techdoc
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 unstripped
    -rwxr-xr-x  1 root    root     300470 2011-10-24 08:58 userlist
    drwxr-xr-x  2 root    root       4096 2011-10-24 08:58 userpics
    -rwxr-xr-x  1 root    root     304603 2011-10-24 08:58 whobbs

    It's hard to copy the entire key with nano and that is why i suggested VI.

    do this

    vi the key

    when you copy it

    type

    :q! to exit

    colon, q, exclamation point

  2. #12
    Join Date
    Mar 2010
    Location
    Pacific Northwest
    Beans
    82
    Distro
    Ubuntu

    Re: rsync over ssh passwordless - please assist with helping me set this up properly

    But how do I add the user/group root to also have access to these folders that are owned by citadel user/group?
    You can add root to the citadel group by

    Code:
    usermod -a -G citadel root
    But I'm not sure that is your issue. You said:

    Doesn't work...I get failed: permission denied errors on the files and folders that are owned by the citadel user/group.
    but I noticed in your errors:

    Code:
    sending incremental file list
    rsync: opendir "usr/local/citadel/data" failed:  Permission denied (13)
    rsync: opendir "usr/local/citadel/network/spooltmp" failed:  Permission denied (13)
    rsync: delete_file: unlink(citadel) failed:  Permission denied (13)
    could not make way for new directory: citadel
    rsync: delete_file: unlink(citadel) failed:  Permission denied (13)
    could not make way for new directory: citadel
    *** Skipping any contents from this failed directoy ***
    that one of the files in question:

    Code:
    drwx------  2 citadel root       4096 2011-10-19 15:04 data
    has no group read permissions and can only be read by the the owning user, citadel. Notice the rest of your directories have
    Code:
    rwxr-xr-x
    permissions so they can be read by the group. So if the 'data' directory is only readable by the citadel user then the root user will not be able to read it. You need to allow group read permissions on the directory or you need to do the rsync for those individual files as the citadel user. The second file with the error is a directory inside the directory you ls'ed but I'm guessing it has the same problem. So I would try this:

    Code:
    root@Source:/#chmod g+r /usr/local/citadel/data
    root@Source:/#chmod g+r usr/local/citadel/network/spooltmp
    I know you said you don't want to change any permissions but as I am seeing it there is really no way around it. I think adding group read permissions is pretty minimal and I don't believe it to be a security risk considering the group is root.
    Last edited by RyanRahl; October 26th, 2011 at 10:12 PM.

  3. #13
    Join Date
    Feb 2011
    Location
    Maryland
    Beans
    2,251

    Re: rsync over ssh passwordless - please assist with helping me set this up properly

    Did you get this working?

  4. #14
    Join Date
    Jun 2007
    Beans
    165
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: rsync over ssh passwordless - please assist with helping me set this up properly

    I'm sorry for the delay in responding.

    I've been able to rsync my Citadel mail data from our Production Server to our backup server now under a root account that doesn't ask for a password. My new mail server isn't connecting properly from Thunderbird...but that's a different problem. For now, I have confirmed that all my mail has successfully transferred to our backup server.

    Thanks so much to all that helped me with this task...it's been dogging me for over 2 years on how to do this.

    I will post exactly what I did for future hits on this post.

    Thanks again Ubuntu community!

  5. #15
    Join Date
    Mar 2010
    Location
    Pacific Northwest
    Beans
    82
    Distro
    Ubuntu

    Re: rsync over ssh passwordless - please assist with helping me set this up properly

    I will post exactly what I did for future hits on this post.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •