If I was to chmod 777 blah.sh on server A and then move it to server B, would it retain the permissions, or would it default to some other permissions once it hit server B?

  • File permissions are stored in inodes.
    – Matt Ball
    Apr 3, 2011 at 21:11

2 Answers 2


That depends entirely and completely on the method of transfer.

rsync will preserve permissions with -p, ownership with -o (using numeric id only if you pass --numeric-ids). -a combines -rlopt, unless you negate it with --no-o or --no-p.

scp will not normally preserve permissions, but will if you pass -p.

cp has roughly the same flags (-p for permissions, -a for everything and recursing).

tar has the -p flag as well.

cpio will always preserve permissions.

  • Note that ftp will not, by default -- unless the FTP client you're using explicitly sets the permissions after uploading, most FTP daemons apply a default umask to uploaded files. Apr 4, 2011 at 7:29

No it won't since the permissions are attached to users.

However it only takes a simple command to chmod a file so just move it and set the permissions.

  • 1
    permissions are attached to whom?
    – sehe
    Apr 3, 2011 at 21:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .