Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Perforce sync clobber writable error

📅 2018-Feb-02 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ error, p4 ⬩ 📚 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

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧