in reply to Re: Re: Re: Setting permissions as text file is created
in thread Setting permissions as text file is created

Not to be terribly nitpicky but the file permissions (at least on the *nixes I've used) don't have any control over wether or not you can delete the file. You need write permissions on the directory the file is in to delete it. i.e.
% ls -al total 12 4 drwxr-xr-x 2 notme notmygroup 4096 Mar 17 11:12 ./ 4 drwxr-xr-x 101 me mygroup 4096 Mar 17 11:12 ../ 4 -rw-rw-rw- 1 me mygroup 42 Mar 17 11:12 foo.foo % rm foo.foo rm: cannot remove `foo.foo': Permission denied % sudo chmod 777 . % rm foo.foo

Replies are listed 'Best First'.
Re: Setting permissions as text file is created
by Hissingsid (Sexton) on Mar 17, 2004 at 17:22 UTC
    Hi, Thanks to everyone who contributed to this discussion. I've learned a lot.

    I've decided to use the umask method suggested and would like to thank Bart for providing the example code snippet.

    Best wishes

    Sid
      My mistake. You're correct. To delete the file you need to have write access to the directory which holds the file.