You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jacob Weber (JIRA)" <ji...@apache.org> on 2016/03/30 21:13:25 UTC
[jira] [Created] (CB-10993) cordova creates shared /tmp/git
directory that's only writable by current user
Jacob Weber created CB-10993:
--------------------------------
Summary: cordova creates shared /tmp/git directory that's only writable by current user
Key: CB-10993
URL: https://issues.apache.org/jira/browse/CB-10993
Project: Apache Cordova
Issue Type: Bug
Components: CLI
Affects Versions: 6.0.0
Reporter: Jacob Weber
Priority: Minor
I have a Linux machine where multiple users run cordova. They use a project whose config.xml has a plugin specifies a particular revision:
{code}
<plugin name="cordova-plugin-statusbar" spec="https://github.com/apache/cordova-plugin-statusbar#244eb71" />
{code}
When they {{cordova prepare}} the project, it ends up calling
{{/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/gitclone.js}}, which creates a directory {{/tmp/git}}.
But the directory is only writable by the current user. So when the next user runs it, they get an error:
{code}
[exec] Fetching plugin "https://github.com/apache/cordova-plugin-statusbar" via git clone
[exec] shell.js: internal error
[exec] Error: EACCES: permission denied, mkdir '/tmp/git/1459363203511'
[exec] at Error (native)
[exec] at Object.fs.mkdirSync (fs.js:799:18)
[exec] at mkdirSyncRecursive (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/mkdir.js:11:8)
[exec] at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/mkdir.js:63:7
[exec] at Array.forEach (native)
[exec] at Object._mkdir (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/mkdir.js:48:8)
[exec] at Object.mkdir (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/common.js:186:23)
[exec] at Object.clone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/gitclone.js:45:11)
[exec] at Object.module.exports.clonePluginGitRepo (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/plugins.js:42:18)
[exec] at Object.module.exports.clonePluginGit (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/plugins.js:32:31)
{code}
This could be solved by using a temporary directory within the user's home directory, or by making {{/tmp/git}} world-writable.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org