[Errno 13] Permission denied_hotcopy_utility

33 views
Skip to first unread message

Balaji

unread,
Nov 14, 2009, 8:49:46 AM11/14/09
to Trac Users
Hi Guys,

This is Balaji. I have recently installed Trac version 0.11.5 using
Apache + mod_python method . Installation and configuration of
database and users went fine without any trouble.

I am trying to make use of hotcopy utility inorder to get the backup
of the multi-project environment D:\proj\trac\ and D:\proj\trac1. The
hotcopy is done properly but i am gettting the error messages like
below,

C:\Documents and Settings\Administrator>d:\Python24\Scripts\trac-
admin.exe D:\proj\trac hotcopy D:\backup\trac-proj
Hotcopying D:\proj\trac to D:\backup\trac-proj...
The following errors happened while copying the environment:
[Errno 13] Permission denied: 'D:\\backup\\trac-proj\\attachments':
'D:\proj\trac\attachments'
[Errno 13] Permission denied: 'D:\\backup\\ trac-proj \\conf': 'D:
\proj\trac\conf'
[Errno 13] Permission denied: 'D:\\backup\\ trac-proj \\db': 'D:\proj
\trac\db'
[Errno 13] Permission denied: 'D:\\backup\\ trac-proj \\htdocs': 'D:
\proj\trac\htdocs'
[Errno 13] Permission denied: 'D:\\backup\\ trac-proj \\log': 'D:
\proj\trac\log'
[Errno 13] Permission denied: 'D:\\backup\\ trac-proj \\plugins': 'D:
\proj\trac\plugins'
[Errno 13] Permission denied: 'D:\\backup\\ trac-proj \\templates':
'D:\proj\trac\templates'
[Errno 13] Permission denied: 'D:\\backup\\ trac-proj ': 'D:\proj
\trac'Hotcopy done.


Could any one guide me to correct the above error inorder get the hot
copy backup done successfully.

Cooke, Mark

unread,
Nov 16, 2009, 4:25:23 AM11/16/09
to trac-...@googlegroups.com
I am guessing you are on windoze (the D:\ sort of gives it away), so
permission issues are less likely but not impossible. How have you
configured apache? Which user does it use? What permissions are set on
the trac and target directories? Remember trac on windoze usually runs
as the apache user which is configured when you setup the service (did
you install yourself or use a packaged installer?)

From memory, the trac hotcopy script only works with sqlite ~ which
database backend are you using?

~ Mark C

Nir Ben Eliezer

unread,
Nov 16, 2009, 5:31:09 AM11/16/09
to trac-...@googlegroups.com
Hey,

I have a short question about creating custom fields in tickets.

I need the option to create a "Sub-Component" drop down menu. This field should be dependent on the component which the user chose. For example, choosing "component1" will result in the appearance of "sub-component1" and "sub-component2" in the "Sub-Component" drop down menu. Choosing other components may result in the appearance of other sub components.

Is this possible to implement? I couldn't find any easy configuration which enables this important option.

Thanks!
Nir







 

Balaji

unread,
Nov 18, 2009, 1:35:19 AM11/18/09
to Trac Users
Yes i am running trac 0.11.5 on windows xp machine.I have configured
apache for the multi-project trac environment. Separate sqlite
database is used as the backend for both the project environment.
Apache is running with the previleges of Local System Account . Apache
2.0 had been installed in this machine before even i started with Trac
0.11.5 configuration.

In my previous setup in a different xp machine, the trac 0.10 version
has been congifured without Apache,i used the default method ,D:
\Python24\Scripts\tracd --port 8000 --auth trac,D:\myproj
\digest.txt,trac D:\proj, to start the tracd daemon. i was not getting
the [Error 13 Permission denied] when the hotcopy command was used.

I hope that i have given a clear idea on this issue.

Regards,
Balaji.
> ~ Mark C- Hide quoted text -
>
> - Show quoted text -

Cooke, Mark

unread,
Nov 18, 2009, 11:33:16 AM11/18/09
to trac-...@googlegroups.com
> > > This is Balaji. I have recently installed Trac version 0.11.5 using
> > > Apache + mod_python method . Installation and configuration of
> > > database and users went fine without any trouble.
> >
> > > I am trying to make use of hotcopy utility inorder to get the backup
> > > of the multi-project environment D:\proj\trac\ and D:\proj\trac1. The
> > > hotcopy is done properly but i am gettting the error messages like
> > > below,
> >
> > > C:\Documents and Settings\Administrator>d:\Python24\Scripts\trac-
> > > admin.exe  D:\proj\trac hotcopy D:\backup\trac-proj
> > > Hotcopying D:\proj\trac to D:\backup\trac-proj...
> > > The following errors happened while copying the environment:
> > >   [Errno 13] Permission denied: 'D:\\backup\\trac-proj\\attachments':
> > > 'D:\proj\trac\attachments'
> > >   [Errno 13] Permission denied: 'D:\\backup\\ trac-proj \\conf': 'D:
> > > \proj\trac\conf'

<snip similar messages>

> > I am guessing you are on windoze (the D:\ sort of gives it away), so
> > permission issues are less likely but not impossible.  How have you
> > configured apache?  Which user does it use?  What permissions are set on
> > the trac and target directories?  Remember trac on windoze usually runs
> > as the apache user which is configured when you setup the service (did
> > you install yourself or use a packaged installer?)
> >
> > From memory, the trac hotcopy script only works with sqlite ~ which
> > database backend are you using?
> >
>
> Yes i am running trac 0.11.5 on windows xp machine.I have configured
> apache for the multi-project trac environment. Separate sqlite
> database is used as the backend for both the project environment.
> Apache is running with the previleges of Local System Account . Apache
> 2.0 had been installed in this machine before even i started with Trac
> 0.11.5 configuration.
>
> In my previous setup in a different xp machine, the trac 0.10 version
> has been congifured without Apache,i used the default method ,D:
> \Python24\Scripts\tracd --port 8000 --auth trac,D:\myproj
> \digest.txt,trac D:\proj, to start the tracd daemon. i was not getting
> the [Error 13 Permission denied] when the hotcopy command was used.
>
When you ran tracd it would have been running as you (unless you changed this when setting up as-a-service?). How do you have the hotcopy setup, do you run it interactively? Have you checked the permission settings on the source and target directories for the account that runs the hotcopy command?

Although less common on windoze, permissions for directories can be changed (I have done this to comply with my company's policies) to exclude most users and that does seem the mostr likely explanation at the moment. However, I do not use hotcopy myself as I use PostgreSQL backend...

~ Mark C

Nir Ben Eliezer

unread,
Nov 22, 2009, 9:38:10 AM11/22/09
to trac-...@googlegroups.com

Any chance someone has an answer for this issue?


Thanks!

Nir


Nir Ben Eliezer wrote:

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-...@googlegroups.com
To unsubscribe from this group, send email to trac-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---



--

--

Nir Ben Eliezer
QA Team Leader
The Nation Traffic

12 Hahilazon St. Ramat-Gan 52522, Israel
Tel: +972.3.755.3300 Ext: 2553
Mobile: +972.54.4450.352
E-Mail: nir...@thenationtraffic.com




 

Chris Nelson

unread,
Nov 23, 2009, 8:26:19 AM11/23/09
to trac-...@googlegroups.com
Nir Ben Eliezer wrote:
> Any chance someone has an answer for this issue?
> I have a short question about creating custom fields in tickets.
>
> I need the option to create a "Sub-Component" drop down menu.
This
> field should be dependent on the component which the user chose. For
> example, choosing "component1" will result in the appearance of
> "sub-component1" and "sub-component2" in the "Sub-Component" drop
> down menu. Choosing other components may result in the appearance of
> other sub components.
>
> Is this possible to implement? I couldn't find any easy
> configuration which enables this important option.

We accomplished this by having compound components like "main/part1",
"main/part2", etc. and adding some JavaScript to the ticket handling
which parses on /, presents just the first part, and adds and populates
a second list box if the item selected in the first part has
subcomponents. Trac still thinks that there's only one component field
(in the db) but users can select subcomponents when creating or updating
tickets.

yoheeb

unread,
Nov 23, 2009, 10:12:29 AM11/23/09
to Trac Users
well, you should of started a new thread rather than hijack this one
for best results, however...
a better way to accomplish this may be to not use components. Keep
your components higher level, like "Software" "Documentation"
"Hardware"

and use the following plugin:
http://trac-hacks.org/wiki/TracTicketChainedFieldsPlugin

seems like what you are really after

Balaji

unread,
Nov 24, 2009, 11:30:37 AM11/24/09
to Trac Users
Yes you are right when i was running the tracd service, it was
runnning with administrator privileges.I checked the permission of
Source (D:\proj\*.*) and Destination (D:\backup\*.*) , both have
administrator privileges.But i get the permission denied for no
reasons, but the environment is backed properly. As of now , i am not
using the tracd service, but i make use of Apache (httpd.conf) to
initiate the trac project environment.
> ~ Mark C- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -

Cooke, Mark

unread,
Nov 25, 2009, 4:56:24 AM11/25/09
to trac-...@googlegroups.com
>
> Yes you are right when i was running the tracd service, it was
> runnning with administrator privileges.I checked the permission of
> Source (D:\proj\*.*) and Destination (D:\backup\*.*) , both have
> administrator privileges.But i get the permission denied for no
> reasons, but the environment is backed properly. As of now , i am not
> using the tracd service, but i make use of Apache (httpd.conf) to
> initiate the trac project environment.
>
How do you know that the backup works OK? Have you tried to restore one of the environments and check that there is nothing missing? Those messages would worry me but I am afraid that I have not other ideas at the moment.

I would need to look at the script and I don't have time for that. Try to work out exactly _what_ the script is trying to do when it fails, you will not get errors if there is nothing wrong...

~ Mark C
> --
>
> You received this message because you are subscribed to the
> Google Groups "Trac Users" group.
> To post to this group, send email to trac-...@googlegroups.com.
> To unsubscribe from this group, send email to
> trac-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=en.
>
>
>

Balaji

unread,
Nov 25, 2009, 11:39:29 AM11/25/09
to Trac Users
The number of folder and files are similar in project source
environment and backup environment. Also the size of the trac.db is
same in both places. The error occurs from the below part of the code
(env.py), which i found in internet. The same code is not available
in my D:\python24\ installation directory.


try:
printout(_('Hotcopying %(src)s to %(dst)s ...',
src=self.env.path, dst=dest))
db_str = self.env.config.get('trac', 'database')
prefix, db_path = db_str.split(':', 1)
if prefix == 'sqlite':
# don't copy the journal (also, this would fail on
Windows)
db = os.path.join(self.env.path, os.path.normpath
(db_path))
skip = [db + '-journal', db + '-stmtjrnl']
else:
skip = []
try:
copytree(self.env.path, dest, symlinks=1, skip=skip)
retval = 0
except shutil.Error, e:
retval = 1
printerr(_('The following errors happened while
copying '
'the environment:'))
for (src, dst, err) in e.args[0]:
if src in err:
printerr(' %s' % err)
else:
printerr(" %s: '%s'" % (err, src))
finally:
# Unlock database
cnx.rollback()

printout(_("Hotcopy done."))
return retval

Regards,
Balaji
> >http://groups.google.com/group/trac-users?hl=en.- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages