Perforce Public Knowledge Base - Permission Denied" Error When Submitting Files
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Permission Denied" Error When Submitting Files

« Go Back



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

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



Was this article helpful?



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

Characters Remaining: 255