Thanks for the explanations John.  Sure enough, if I run cmd.exe on
windows, and then
echo Hello > x:hello.txt
it gets created with 644 on linux - which is quite reasonable I would
have thought.

You say that simple programs just overwrite the file - and hence
retain the permissions, whilst more sophisticated programs create a
temporary file then rename it - thereby getting the permissions of the
default file creation mask.  Would it be too much to hope that even
more sophisticated programs, after creating the temporary file, gave
it the permissions of the file it is to replace?  To me this seems
obvious - IF one has the ability to set permissions.  Presumably Samba
doesn't provide a means to set permissions, so all we can have is the
create mask?

Given how often I save a script from vim, versus how often I get a
power failure at the exact moment I save a file, it seems to me that
the 'simple (and stupid) program' approach would be far more useful to
me - especially considering I of course keep the backup files that vim
creates.  I don't suppose there's an option in vim to get it to use
the permission retaining approach to saving files?

(I guess I could wrap my save command to first run a command over ssh
to get the permissions, then save, then run another ssh command to
restore them - but surely there's a simpler way?)

John

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to