Link to home
Start Free TrialLog in
Avatar of SAM2009
SAM2009Flag for Canada

asked on

Are files permissions are kept when they are copied from Linux to Windows shared folder?

Are files permissions are kept when they are copied from Linux to Windows shared folder?
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Access Control Lists depend on the file system used.  NTFS is not used on Linux systems - they usually use EXT4.  Different kind of permissions system is in place there.  So no, they can't copy because where they are stored does things differently.

Avatar of SAM2009

ASKER

As I said it's a copy from Linux to Windows, so my concern are Linux permissions.
As I said, NO, they can't copy, the file systems are different.  They can't copy from Linux to Windows, they can't copy from Windows to Linux.
They will inherit whatever the permissions of the parent directory are.
Avatar of SAM2009

ASKER

What happen if I mount a Windows NFS shared and copy files from Linux, do you think Linux permissons will be kept in Windows?
SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dear SAM,

Your question is for copied files or for files in a shared folder?

File permissions are not copied when you copy files.

If yo access files over shared folder, then it depends on the server sharing the folder to apply permissions.
Avatar of noci
noci

@omarfarid:
File permissions CAN be copied, use -p in the copy command.  (or use tar xp ... when extracting) or rsync -p ...
(the -p in those case stand for preserve uid, gid & protection).
@noci

What you mentioned can be the case for unix to unix or alike operating system.

Here it is to windows or from windows. Will this stand or even has meaning when the two operating systems are not the same for ruserid, groupid, file perms?
@omarfarid i was responding to this:
File permissions are not copied when you copy files.
That has no qualification what so ever.  With samba a best effort is made to preserve the unix atributes in windows rights and vice-versa. No complete mapping can obviously be done. SAMBA does honor the SMB server side of things.
Avatar of SAM2009

ASKER

Thanks to all!
You're welcome!