LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync: How NOT to preserve permission? (https://www.linuxquestions.org/questions/linux-software-2/rsync-how-not-to-preserve-permission-417014/)

edwin11 02-18-2006 07:40 PM

rsync: How NOT to preserve permission?
 
Hi all,

/mnt/windowsResrc is the mount point for a NTFS partition. Hence, all files and directories on it has permission 555.

/mnt/windowsResrcBak is the mount point for a VFAT partition. It is mounted with umask 0022.

Now when i do this,

Code:

rsync -vrtL --delete /mnt/windowsResrc /mnt/windowsResrcBak
All the copied files and directories end up with permissions of 555 (seems to be preserved?) even though i did not have the "-p" option set for rsync, and /mnt/windowsResrcBak was mounted with a umask of 0022.

Why is this so?

Even more strange (to me), when i umounted /mnt/windowsResrcBak, and then mounted it again with umask 0022, the permissions of 555 for all its files and directories still remained!

I had this understanding that VFAT does not have the ability to persist ownership and permissions, and that these things are "artificially" set when we mount the filesystem using the specified "-o uid=xxxx,gid=xxxx,umask=xxxx" option. But seems like my understanding was totally off?



TIA and Regards,
Edwin

kilgoretrout 02-19-2006 09:18 AM

For read/write on a FAT32 I normally use umask=0. Your understanding is not off AFAIK. FAT32 has no native permission structure and linux temporarily grafts one on through the mounting options you pass or your fstab entry for the partition.

edwin11 02-20-2006 07:10 AM

Quote:

Originally Posted by kilgoretrout
FAT32 has no native permission structure and linux temporarily grafts one on through the mounting options you pass or your fstab entry for the partition.

Precisely what i thought too. But why is it that when i mounted the VFAT partition with a umask of 0022, the files did not get permissions of 755 (or 644?), but retained 555 instead? :confused:



Thanks and Regards,
Edwin


All times are GMT -5. The time now is 07:33 AM.