Score:0

Two files with exact same permissions, but one is opening read-only

au flag

On an Ubuntu 22.04 VM, when I look at my files, I see that they have read/write/execute permissions set up correctly for root and vboxsf:

$ ls -lrt foo.pvs bar.pvs
-rwxrwx--- 1 root vboxsf 23492 Jan 24 12:08 foo.pvs
-rwxrwx--- 1 root vboxsf  1328 Apr  4 09:50 bar.pvs

The user (me) is set up as a member of the group vboxsf. However, when I load the two files up in emacs, they act differently. The first file (which I'm calling foo.pvs here, but that's not its real name) works just fine, but the second file (which I'm calling bar.pvs) opens up as read-only for some reason. Is there some hidden setting somewhere else in Ubuntu (or VirtualBox) that is affecting this? If it matters, this is on a mounted folder with a Windows 11 host.

Additional fact I figured out while writing this question: when I open bar.pvs up using vi, it's not read-only. Making a change and saving it out, however, doesn't change the status in emacs. I need to open the file in emacs, because I'm really opening the file up in pvs (SRI's Prototype Verification System), which is a skin around emacs.

ar flag
Please add the OS and version number to your question.
Score:0
au flag

Short answer: delete the hidden file .#bar.pvs

As I was trying to add more detail to my question, I gathered the information I needed to figure it out.

When doing an ls -lart, I found a hidden file called .#bar.pvs file, but there was no .#foo.pvs. When I tried to delete this file, I couldn't do it from within Ubuntu (at least not easily, not even using sudo), so I deleted it from within Windows. From what I can tell, it seems the .#bar.pvs file was created when I was editing the file in PVS, but the system crashed while it was open and so it wasn't properly removed upon exit.

After doing so, opening it up in emacs no longer set the file to read-only.

Hannu avatar
ca flag
`$ sudo rm '.#bar.pvs'`
David avatar
cn flag
@Hannu This needs some context.
Ben Hocking avatar
au flag
I believe what Hannu is suggesting is that I could've used `sudo` to `rm` the files. Alas, due to the underlying Windows file system managing things, that was not the case.
Hannu avatar
ca flag
Yes that was a quickie to indicate exactly that, if the VM cannot handle it's own files, then that is a bug.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.