<div dir="ltr"><div class="gmail_quote"><div dir="ltr">I apologise for re-opening this topic. I did not receive the reply kindly sent me by Renato Alves other than as part of a daily digest (I had only subscribed to digests) and I don't know how to simulate a reply to keep the old thread going.<div><br></div><div>My original query was as follows:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>When I try to edit an existing password using vim, when it comes time to</div></div><div><div>save (I enter :w as a vim command) I get a message</div></div><div><div>"/dev/shm/pass.tQVSIzXmX17hI/M<wbr>csB5-test-pass.txt" E212: Cannot open file</div></div><div><div>for writing</div></div><div><div><br></div></div><div><div>I'm sure I used to be able to edit passwords, but I can't work out why I<br></div></div><div><div>can't save to /dev/shm. Does anybody have any ideas?</div></div><div><div><br></div></div><div><div>Steps to recreate:</div></div><div><div><br></div></div><div><div>1) pass add test-pass (followed by entering the password twice)</div></div><div><div>2) pass show test-pass works fine and displays password from previous</div></div><div><div>step</div></div><div><div>3) pass edit test-pass</div></div><div><div><br></div></div><div><div>opens instance of gvim, so I make a change and :w and I get the error</div></div><div><div>message above.</div></div><div><div><br></div></div><div><div><br></div></div><div><div>Notes:</div></div><div><div><br></div></div><div><div><br></div></div><div><div>   1. mount | grep "shm" gives</div></div><div><div>   tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)</div></div><div><div>   2. df -h | grep shm gives</div></div><div><div>   tmpfs                  3.8G  152M  3.7G   4% /dev/shm i.e. we're not out</div></div><div><div>   of temp disk space (or indeed inodes, checked separately)</div></div><div><div>   3. crontab -e works, so saving to a temporary file seems to work</div></div><div><div>   4. with EDITOR set to nano, it seems to work</div></div></blockquote><div><br></div><div>Renato Alves replied:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>Most likely permissions. Try: ls -ld /dev/shm</div></div><div><br></div></blockquote>When I try ls -ld /dev/shm I get <br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><br></div><div>drwxrwxrwt 2 root root 260 Dec  1 09:19 /dev/shm<br></div><div><br></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>which looks good to me.</div><div><br></div></blockquote><div>If I try touch /dev/shm/something then I get no message and something is created in the /dev/shm directory.</div></div><div><br></div><div>If I try vim /dev/shm/something-else, add a line, then :wq, it all works fine (the something-else file is created).</div><div><br></div><div>As I said above, if I do pass edit test-pass, then when I do :w I get e.g. message</div><div><br></div><div><div>"/dev/shm/pass.tQVSIzXmX17hI/M<wbr>csB5-test-pass.txt" E212: Cannot open file</div><div>for writing</div></div><div><br></div><div>but if instead of :w I do :saveas /dev/shm/anything then it saves fine, but of course the original password file is not changed.</div><div><br></div><div>It seems to be only when I try to write to the temporary filename that is created as part of the process of executing pass edit etc. that I am blocked from writing.</div><div><br></div><div>Sorry to go on at such length. If anybody has a clue why this might be happening, I would be grateful to know.</div><div><br></div><div>Thanks.</div></div></div></div>