[
https://issues.apache.org/jira/browse/CB-10993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nikhil Khandelwal updated CB-10993:
-----------------------------------
Assignee: Omar Mefire
> 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
> Assignee: Omar Mefire
> Priority: Minor
> Labels: triaged
>
> I have a Linux machine where multiple users run cordova. They use a project
> whose config.xml has a plugin which 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: [email protected]
For additional commands, e-mail: [email protected]