-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
When importing test.dmp into an empty Studio instance where no project exists, the following error was encountered:
Last import result was: Error importing file "test.dmp" at 12/15/10 8:46 PM: DumpSvnRepoCommand: failed to execute command - error code is: 1 error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.349-2046.dmp.gz: Permission denied svnadmin: Can't write to stream: Broken pipe
And following messages were seen in JIRA log:
@400000004d097da70e7587cc 2010-12-15 20:46:53,241 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1246x1918x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer/existingsvnrepo [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/data/jirastudio/svn/root' in directory cwd @400000004d097da710131acc 2010-12-15 20:46:53,268 ajp-j2ee.instance.jirastudio.com-jira%2F127.0.0.104-8009-3 WARN sysadmin 1246x1919x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer/unknownusers [studio.svnimport.components.SvnDumpFileManager] executing grep -A2 svn:author '/webdav/dump_files/test.dmp' | grep -v '^\(svn:author\|V \|--\)' | sort -u in directory cwd @400000004d097da71215d83c 2010-12-15 20:46:53,302 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] Executing command: grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 @400000004d097da7121db00c 2010-12-15 20:46:53,303 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing grep '^Revision-number:' '/webdav/dump_files/test.dmp' | tail -n1 in directory cwd @400000004d097da7135447c4 2010-12-15 20:46:53,323 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin create STAGING in directory /tmp @400000004d097da717c85354 2010-12-15 20:46:53,398 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin load '/tmp/STAGING' < /webdav/dump_files/test.dmp in directory cwd @400000004d097da71b599c1c 2010-12-15 20:46:53,458 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnlook tree '/tmp/STAGING' in directory cwd @400000004d097da71be85b14 2010-12-15 20:46:53,467 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] executing svnadmin dump -q '/data/jirastudio/svn/root' | gzip -f > "/webdav/dump_files/studio-svn-backup-2010.12.349-2046.dmp.gz" in directory cwd @400000004d097da71c746e74 2010-12-15 20:46:53,476 SVN Importer undumping thread WARN sysadmin 1246x1920x1 1cqah0x 172.20.4.201 /rest/studio/svnimport/1.0/importer [studio.svnimport.components.SvnDumpFileManager] failed to execute command - error code is: 1 <br>error message: /bin/bash: /webdav/dump_files/studio-svn-backup-2010.12.349-2046.dmp.gz: Permission denied @400000004d097da71c7481fc svnadmin: Can't write to stream: Broken pipe @400000004d097da71c748db4
Something that might or might not be relevant:
This might have something to do with the way we setup WebDAV in production and how the svn-importer executes OS command like svnadmin.
The WebDAV directory is owned by Apache, and so are its sub-directories:
[root@dev1 /]# find /webdav/ -ls 16154625 4 drwxrwsr-x 3 apache apache 4096 Dec 16 10:47 /webdav/ 16154626 4 drwxrwsr-x 2 apache apache 4096 Dec 16 11:19 /webdav/dump_files 16154627 4 -rw-r{-}{-}r-\- 1 apache apache 1374 Dec 16 11:19 /webdav/dump_files/test.dmp
It looks like the importer was executing svnadmin as the OS account who owns JIRA, which is js-jira in production, because the "staging" directory was created by js-jira:
[root@dev1 /]# find /tmp/STAGING/ -type d -ls 12746896 4 drwxr-xr-x 6 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/ 12746900 4 drwxr-xr-x 2 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/hooks 12746910 4 drwxr-xr-x 2 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/conf 12746897 4 drwxr-xr-x 2 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/locks 12746915 4 drwxr-sr-x 6 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/db 12746917 4 drwxr-sr-x 3 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/db/revs 12746918 4 drwxr-sr-x 2 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/db/revs/0 12746921 4 drwxr-sr-x 2 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/db/transactions 12746922 4 drwxr-sr-x 2 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/db/txn-protorevs 12746919 4 drwxr-sr-x 3 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/db/revprops 12746920 4 drwxr-sr-x 2 js-jira js-jira 4096 Dec 16 11:38 /tmp/STAGING/db/revprops/0
[CLOUD-3490] SVN-Importer: permission denied for svnadmin
Workflow | Original: OnDemand v1 - Restricted [ 1431279 ] | New: JAC Bug Workflow v3 [ 3723993 ] |
Status | Original: Deployed [ 10036 ] | New: Closed [ 6 ] |
Workflow | Original: OnDemand v1 [ 438611 ] | New: OnDemand v1 - Restricted [ 1431279 ] |
Project Import | New: Wed Oct 10 17:14:34 CDT 2012 [ 1349907274183 ] |
Workflow | Original: Studio v.2 [ 39073 ] | New: OnDemand v1 [ 79815 ] |
Status | Original: Resolved [ 5 ] | New: Deployed [ 10006 ] |
Fix Version/s | New: 2.4 Iteration 4 [ 12191 ] | |
Assignee | Original: Janusz Gorycki [ jgorycki ] | |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |