7

I just started using Copy, and it seems great, though I am having one difficulty. I'm running two Xubuntu Linux computers, one at work and one at home. The one at work is 64 bit and the one at home is 32 bit (I don't know if this is a problem or not, though presumably it shouldn't be). The problem is that when I drop a file into the /Copy folder from either end it'll show up on the other computer but with its permissions changed.

Specifically, if I write a test ASCII file in emacs and save it, it'll have the permissions:

-rw-rw-r-- 1

However, it'll show up on the other end with permissions:

-rwx------ 1

This can be particularly annoying, especially since executable files are colored green by the shell. Is there any fix around this?

3 Answers3

7

You can use rsync to copy your files. The -p option will preserve permissions and so many options:

-p          --> Preserve permissions 
-E          --> Preserve Executability
-o          --> Preserve OwenrShip
-g          --> Preserve Groups
-t          --> Preserve modifition time

for further redings use this link

3

cp also can copy files preserving permissions, ownership etc. For this you need to use the --preserve switch. Here's the corresponding manual entry:

--preserve[=ATTR_LIST]
preserve the specified attributes (default:
mode,ownership,timestamps), if possible additional attributes:
context, links, xattr, all

But as Fiximan suggested cp -a would be simpler. From man pages again,

-a, --archive ; same as -dR --preserve=all

So the command would be something like:

cp -a <source> <destination>

That being said, since you are copying files, especially between a computer at work to home via the internet, it is best to use scp. scp has the -p switch which will preserve modification times, access times, and modes from the original file. You may also want to use the -r switch to recursively copy folders and subfolders. Here is a good guide on how use scp to transfer files.

daltonfury42
  • 5,559
1

If you are vendor-locked on Copy, you can ask support on their site about preserving attributes.

If you have GUI, I suggest to use FreeFileSync.

It

  • is open-source (GPLv3) software;
  • works great with local and remote (FTP, SMB/CIFS, SSH via GVFS) files;
  • compares by attributes and by content;
  • have flexible sync settings (two way, mirror, update, custom);
  • has real-time sync agent;
  • preserves attributes and allows to copy file access permissions.

Also you can try Unison (Ubuntu package available) or any other program from Wikipedia list.

N0rbert
  • 103,263