00:18:58 In /etc/ssl/certs , I cannot create a new file with cat: 00:19:10 # cat self.crt self.key > self.pem 00:19:21 sh: cannot create self.pem: Permission denied 00:19:49 Even though I can open, edit, and save self.pem in a text editor, also as root. Why? 01:56:31 ant-x, Works for me. Is self.pem actually a symlink to some place that is truly not writable? 01:57:09 No, it is cat-related: I have done it by hand. 02:00:38 No symlinks. 02:01:17 As I said, I can create self.pem with ``vi self.pem`` or with ``touch self.pem'' (as root). 02:05:20 csh has a shell flag that prevents it overwriting files with > redirection. Is that set for you? 02:05:42 I use sh. 02:07:06 doas echo test > self.pem # fails, too. 02:07:15 set -o | grep clobber 02:07:30 I am doing that under /etc/ssl/certs (perhaps it matters). 02:07:31 doas will not have any effect on a > redirection. 02:07:40 Ooop! 02:07:56 What does "set -o | grep clobber" show? 02:08:01 Unless I do something like eval? 02:08:46 You said you were already root so there is no need for doas. 02:09:06 That explains it. This works: doas sh -c "echo test > self.pem" 02:09:17 However if you want to use doas to elevate a non-root process then: doas sh -c "echo foo > foo.txt" 02:09:25 Jinx! 02:09:39 I said that to simplify things. I use doas to assume root. Beg pardon!@ 02:09:50 Yep. Thanks. 02:10:28 That'll teach me to report things literally as they are. 02:10:30 I still think you must have the shell's noclobber option set. 02:11:34 No, I don't (just checked). I have never heard of this options.