Help for umask

Hi,

I want to set umask value only for vi editor.
If I create new file using vi editor, then automatic permission should be 777.
I want to set umask 000.
Please help me.

Thanks in advance

One wonders why the default file permissions should be RWX for all users. If you really want this, then you may be better defining an alias in your shell such that it edits the files then set the permissions. Something like:-

alias myvi="vi $*;chmod 777 $*"

... might suffice.

It does leave you very open to abuse though. Perhaps you would be better to consider granting access on a need basis rather than just the grant-to-all you are suggesting.

I hope that this helps,
Robin
Liverpool/Blackburn
UK

Will never cause a file to be created with permissions 777 by default. The new file will have permissions 666 . However a new directory will have permissions 777 .

There is no reason to set permissions 777 on anything except a communal work directory. It just shows a lack of understanding of permissions.