<p dir="ltr">Hi,</p>
<p dir="ltr">On Dec 1, 2016 10:53 AM, "ads" <<a href="mailto:ads@whatho.net">ads@whatho.net</a>> wrote:<br>
><br>
> 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.<br>
><br>
> My original query was as follows:<br>
><br>
>> When I try to edit an existing password using vim, when it comes time to<br>
>> save (I enter :w as a vim command) I get a message<br>
>> "/dev/shm/pass.tQVSIzXmX17hI/McsB5-test-pass.txt" E212: Cannot open file<br>
>> for writing<br>
>><br>
>> I'm sure I used to be able to edit passwords, but I can't work out why I<br>
>> can't save to /dev/shm. Does anybody have any ideas?<br>
>><br>
>> Steps to recreate:<br>
>><br>
>> 1) pass add test-pass (followed by entering the password twice)<br>
>> 2) pass show test-pass works fine and displays password from previous<br>
>> step<br>
>> 3) pass edit test-pass<br>
>><br>
>> opens instance of gvim, so I make a change and :w and I get the error<br>
>> message above.<br>
>><br>
>><br>
>> Notes:<br>
>><br>
>><br>
>>    1. mount | grep "shm" gives<br>
>>    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)<br>
>>    2. df -h | grep shm gives<br>
>>    tmpfs                  3.8G  152M  3.7G   4% /dev/shm i.e. we're not out<br>
>>    of temp disk space (or indeed inodes, checked separately)<br>
>>    3. crontab -e works, so saving to a temporary file seems to work<br>
>>    4. with EDITOR set to nano, it seems to work<br>
><br>
><br>
> Renato Alves replied:<br>
><br>
>> Most likely permissions. Try: ls -ld /dev/shm<br>
>><br>
> When I try ls -ld /dev/shm I get <br>
>><br>
>><br>
>> drwxrwxrwt 2 root root 260 Dec  1 09:19 /dev/shm<br>
>><br>
>> which looks good to me.<br>
>><br>
> If I try touch /dev/shm/something then I get no message and something is created in the /dev/shm directory.<br>
><br>
> If I try vim /dev/shm/something-else, add a line, then :wq, it all works fine (the something-else file is created).<br>
><br>
> As I said above, if I do pass edit test-pass, then when I do :w I get e.g. message<br>
><br>
> "/dev/shm/pass.tQVSIzXmX17hI/McsB5-test-pass.txt" E212: Cannot open file<br>
> for writing<br>
><br>
> 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.</p>
<p dir="ltr">What if you try to write in /dev/shm/foo/bar?</p>
<p dir="ltr">><br>
> 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.<br>
><br>
> Sorry to go on at such length. If anybody has a clue why this might be happening, I would be grateful to know.<br>
><br>
> Thanks.<br>
><br>
> _______________________________________________<br>
> Password-Store mailing list<br>
> <a href="mailto:Password-Store@lists.zx2c4.com">Password-Store@lists.zx2c4.com</a><br>
> <a href="https://lists.zx2c4.com/mailman/listinfo/password-store">https://lists.zx2c4.com/mailman/listinfo/password-store</a><br>
></p>