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?

  • 1
    Same problem. Ever find a solution? – Michael.Lumley Jul 31 '15 at 20:59
  • 1
    @Michael.Lumley, no, unfortunately I didn't. I can't say that I spent a great deal of time trying to figure it out after posting this question. I couldn't find anything else online regarding it and don't have access to the Copy source. – gammapoint Aug 1 '15 at 1:49
  • 1
    Somewhere there is a "preserve" permissions tag or option, which keeps the same permissions of the copied file. – j0h Aug 1 '15 at 13:12
7
+50

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

  • 1
    As the manual indicates, -a covers most "preserve" settings. -avuz will preserve practically everything (-a), only update files (-u, i.e. don't copy if the file is present in the destination and equal to the one in the source), compress before sending (-z) and be verbose about what's happening (-v). – Alex Aug 7 '15 at 18:11
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.

  • cp -a would be simpler. From man cp : " -a, --archive ; same as -dR --preserve=all" ; or since it's remote: scp -p – Fiximan Aug 5 '15 at 10:58
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.