Permissions problem I don't understand
hashproduct at verizon.net
Wed Nov 30 23:30:47 GMT 2005
On Wed, 2005-11-30 at 18:33 +0000, Alan Chandler wrote:
> Now I realise the problem I have examined what I am trying to see what cgywin
> says about the directories on the laptop by running a bash shell and ls -l
> from it. It says all the "Standard" directories (such as "My Documents") all
> have permissions of 555.
That's because the FAT/NTFS "read only" flag is set on these
directories. "Read only" is an advisory flag that is independent of
real NTFS ACLs, and the filesystem ignores "read only" on folders. For
this reason, the Windows Explorer people found it convenient to use
"read only" on folders to mean "magic", i.e., Explorer should read the
"desktop.ini" file inside, which might specify a special icon, tooltip,
and/or view. Windows endows My Documents, My Pictures, and a few other
folders with magic upon creation; one can also make a folder magic by
creating a "desktop.ini" and setting read-only by hand (at a DOS prompt;
Windows Explorer won't let you).
It is unsurprising that Cygwin converts "read only" to 555 permissions.
The same happens when I mount a FAT32 partition on Linux. The
filesystem drivers should know better.
In the meantime, you can work around the problem using --chmod=Du+w or
rsyncd-perm settings; you'll need an rsync patched to support one of
these. One such, my own custom rsync, includes both the rsyncd-perm
patch and a --chmod option enhanced so that it can be used on either
side without remote support. It is available at:
However, I'm not sure if you would want to trust it for your backups
until it is better tested.
Alternatively, you can remove the magic read-only flag from the
offending folders (attrib -R at a DOS prompt), but this has a slight
chance of confusing Windows.
Matt McCutchen, ``hashproduct''
hashproduct at verizon.net -- http://hashproduct.metaesthetics.net/
More information about the rsync