Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Perforce sync clobber writable error

📅 2018-Feb-02 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

Problem

I was trying to sync a Perforce client and got this error:

$ p4 sync
Can't clobber writable file: /home/joe/p4_workspace/foobar.txt

Solution

Perforce keeps its files read-only until they are opened for editing. I had for some reason made this file writeable and Perforce was complaining about that with this error message.

The error was fixed and the sync worked once I made the file read-only:

$ chmod -w /home/joe/p4_workspace/foobar.txt