Cannot edit existing password using vim (or gvim)

ads ads at whatho.net
Thu Dec 1 10:52:22 CET 2016


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.

My original query was as follows:

When I try to edit an existing password using vim, when it comes time to
save (I enter :w as a vim command) I get a message
"/dev/shm/pass.tQVSIzXmX17hI/McsB5-test-pass.txt" E212: Cannot open file
for writing

I'm sure I used to be able to edit passwords, but I can't work out why I
can't save to /dev/shm. Does anybody have any ideas?

Steps to recreate:

1) pass add test-pass (followed by entering the password twice)
2) pass show test-pass works fine and displays password from previous
step
3) pass edit test-pass

opens instance of gvim, so I make a change and :w and I get the error
message above.


Notes:


   1. mount | grep "shm" gives
   tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
   2. df -h | grep shm gives
   tmpfs                  3.8G  152M  3.7G   4% /dev/shm i.e. we're not out
   of temp disk space (or indeed inodes, checked separately)
   3. crontab -e works, so saving to a temporary file seems to work
   4. with EDITOR set to nano, it seems to work


Renato Alves replied:

Most likely permissions. Try: ls -ld /dev/shm

When I try ls -ld /dev/shm I get


drwxrwxrwt 2 root root 260 Dec  1 09:19 /dev/shm

which looks good to me.

If I try touch /dev/shm/something then I get no message and something is
created in the /dev/shm directory.

If I try vim /dev/shm/something-else, add a line, then :wq, it all works
fine (the something-else file is created).

As I said above, if I do pass edit test-pass, then when I do :w I get e.g.
message

"/dev/shm/pass.tQVSIzXmX17hI/McsB5-test-pass.txt" E212: Cannot open file
for writing

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.

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.

Sorry to go on at such length. If anybody has a clue why this might be
happening, I would be grateful to know.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20161201/ba25241d/attachment.html>


More information about the Password-Store mailing list