Perforce Public Knowledge Base - Permission Denied" Error When Submitting Files
Perforce Software logo
Reset Search
 

 

Article

Permission Denied" Error When Submitting Files

« Go Back

Information

 
Problem

When submitting files to a Unix Perforce server, I am getting the following error:

 

Operation 'open for write' failed.
Librarian checkin depot/foo failed.
RCS lock on depot/foo,v failed!
open for write: depot/tmp.5237.106: Permission denied
Solution

This error indicates a problem related to the Unix user ownership (permissions) of the depot files.

To identify the user that started the Perforce server, enter the command:

ps -ef | grep p4d

To determine the "ownership" of the versioned files, enter the command:

 

ls -l <depot_path/<depot_dir>

This command will list the contents of the specified directory with a user and group column. If the user column does not match the user that started the Perforce server, the server process will be unable to write or modify those files.

To fix the issue you need to change the ownership of the depot files.

As the root user run:

chown -R perforce.perforce <depot_path>/<depot_dir>

Then re-submit the pending changelist.

 

Note: This can also happen to the Perforce database tables, journal or log files. A common mistake is inadvertently running server commands or performing a restore from checkpoint as the root user, and then attempting to start the server using the regular user account. You can use the same commands to diagnose and fix the problem with any Perforce server files.

Note: For security reasons you should never start the Perforce Server as the Unix root user.

Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255