Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Questions and answers begin here Logo Questions and answers begin here Logo
Sign InSign Up

Questions and answers begin here

Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Blog
  • Contact Us

How to fix Perforce error “can’t clobber writable file” or Perforce error messages like “file could be clobbered”?

Home/ Questions/Q 335
Next
Answered
How to fix Perforce error "can't clobber writable file" or Perforce error messages like "file could be clobbered"?
yfn38
yfn38 Teacher

I’m having trouble with a Perforce error message that says “can’t clobber writable file”. I’m not sure what that means or how to fix it. I tried searching online for solutions, but the ones I found didn’t work for me.
Here’s the code that’s causing the problem:

p4 edit file.txt
echo "Hello World" > file.txt
p4 submit -c "Added Hello World to file.txt"

After running this code, I get the error message “can’t clobber writable file”. I’m not sure what it means. I thought maybe it was a permissions issue, but I checked and I have write permissions for the file. I also tried running the code as an administrator, but that didn’t work either.
I’m not sure what else to try. Can anyone help me figure out why I’m getting this error message and how to fix it?

clobbererrormessageperforcewritable
  • 523
  • 0 Followers
  • 1
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    kiddibgg Teacher
    2017-12-11T20:47:18+00:00Added an answer about 5 years ago

    Hi there! It seems like you’re running into an error with Perforce where you’re unable to overwrite a file. This can be frustrating, but fortunately, there are several potential solutions to this problem.
    First, make sure that you have the correct permissions to modify the file in question. If you’re not the owner of the file or you don’t have write permissions, you may need to contact the owner or the administrator of the file to request access.
    Another potential solution is to use the “-f” or “-force” option with your Perforce command. This option will force the server to allow the file to be overwritten, regardless of any warnings or errors that may occur. However, be careful when using this option, as it can result in the loss of data if you overwrite a file unintentionally.
    If these solutions don’t work, you may need to look into the file locking settings in Perforce. It’s possible that the file you’re trying to modify is currently locked by another user or process, which would prevent you from overwriting it. In this case, you can try checking the lock status of the file using the “p4 opened” command, and if necessary, you can use the “p4 unlock” command to release the lock.
    Finally, double-check to see if there are any conflicting file versions or pending changes. If there are multiple versions of the file in question, or if there are pending changes that need to be resolved first, this can also prevent you from overwriting the file. In this case, you may need to merge the changes or resolve any conflicts before you can overwrite the file.

    I hope these solutions help you to resolve the issue with the Perforce error message! If you have any further questions or need more guidance, feel free to ask.

    • 156
    • Reply
    • Share
      Share
      • Share onFacebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. saman_hoseini_1988 Teacher
    2017-12-29T21:45:43+00:00Added an answer about 5 years ago

    One possible solution to fixing the “Perforce Error: Can’t clobber writable file” is to first check the file permissions and make sure that the file is not marked as read-only. Sometimes, the underlying issue might have nothing to do with Perforce itself, but instead could be caused by file system permissions or other factors, which can cause the same error to appear.

    Another solution can be to manually merge changes to the file outside of Perforce, and then submit the merged file back to the depot. This bypasses the “Can’t clobber writable file” error altogether, allowing you to commit changes to the file.

    In my own experience, it’s also worth considering using a Perforce client like P4V or P4, as it can help you uncover the underlying cause of the error by providing more detailed information regarding files and their status. A client can also provide easy access to changelists, diffs and logs, which can make debugging and fixing errors more efficient.

    • 4
    • Reply
    • Share
      Share
      • Share onFacebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.