Koozali.org: home of the SME Server

using rsync via ssh

Offline lisyan

  • 3
  • +0/-0
using rsync via ssh
« on: February 23, 2015, 05:52:32 PM »
hey there,
it happens that I need, once in a while, to upload files remotely to a sme-server.
Assuming the safest way requires ssh, I managed to use rsync. So I ran:
Code: [Select]
sudo rsync -avz --chmod=777 -e ssh  /localmachine/folder root@XX.XX.XX.XX:/home/e-smith/files/ibays/XXXXXXXXXX
the command seems to work. Anyway once I try to lookup into the sme-server folder, logged in as root via ssh, the files are not there. This is quite strange because if I try to rsync the remote folder to my local machine I can transfer all that files. In other words: the files seems to be only hidden to the root user. How could this be possible?

note: I put chmod=777 to avoid disaster with file permissions. Anyway I also tried a clean version of the command above removing the "chmod" declaration but anything changed.
« Last Edit: February 23, 2015, 05:54:58 PM by lisyan »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: using rsync via ssh
« Reply #1 on: February 23, 2015, 08:56:59 PM »
note: I put chmod=777 to avoid disaster with file permissions.

'chmod 777' *IS* a disaster. Don't ever set mode to 777. It allows any account on the system to change your data.

Offline lisyan

  • 3
  • +0/-0
Re: using rsync via ssh
« Reply #2 on: February 23, 2015, 11:04:32 PM »
'chmod 777' *IS* a disaster. Don't ever set mode to 777. It allows any account on the system to change your data.

yes true. This was just to be sure to avoid any permission related problem in a "test" environment.
Anyway this doesn't explain why the file are invisible asking the system to list the folder content.

ps: thanks for the note :)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: using rsync via ssh
« Reply #3 on: February 24, 2015, 03:11:32 PM »
In other words: the files seems to be only hidden to the root user. How could this be possible?

I don't believe that it is. You must be looking in the wrong place.

Try:

sudo rsync -avz  -e ssh  /localmachine/folder/. root@XX.XX.XX.XX:/home/e-smith/files/ibays/XXXXXXXXXX/.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: using rsync via ssh
« Reply #4 on: February 27, 2015, 11:16:04 AM »
Aren't you missing the FILES CGI-BIN and HTML directories ?
If you're transfering Web site files you rsync should copy to CGI-BIN or HTML dir and if they're user files to be acessible by CIFS they should be copied to FILES directory.
Using that RSYNC command files are in "root" of e-bay!
...