Description
http://moinmoin.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation, createinstance.sh tries:
chown www-data.www-data
also, the path of shared might be found out differently ... given createinstance will be placed in bin.
Workaround
change the script yourself.
Solution
change two things:
# path of MoinMoin shared files #SHARE=/usr/local/share/moin pythonexe=`which python` SHARE=`dirname $pythonexe`/../share/moin
#chown -R $USER.$GROUP $INSTANCE chown -R $USER:$GROUP $INSTANCE
- This differs on particular platforms - what does the POSIX standard say?
- info coreutils chown:
Some older scripts may still use `.' in place of the `:' separator. POSIX 1003.1-2001 (*note Standards conformance::) does not require support for that, but for backward compatibility GNU `chown' supports `.' so long as no ambiguity results. New scripts should avoid the use of `.' because it is not portable, and because it has undesirable results if the entire OWNER`.'GROUP happens to identify a user whose name contains `.'.
- info coreutils chown:
Patch
I have made patch which changes some things and also puts the createinstance additionally in contrib/createinstance with a README.txt. I think that should made it easier to be used. -- ThiloPfennig 2007-05-06 16:38:01
1 diff -r fa6e150cec23 contrib/createinstance/README.txt
2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3 +++ b/contrib/createinstance/README.txt Sun May 06 18:24:13 2007 +0200
4 @@ -0,0 +1,29 @@
5 +README Wiki Instance Creation
6 +
7 +After you have downloaded and installed MoinMoin, you will want to "have a wiki".
8 +You can use the contributed "createinstance.sh" bash script to install the instance.
9 +
10 +*How to use*
11 +
12 + 1. Copy the script to your home directory (or $HOME/bin)
13 +
14 + 2. Edit the script
15 +
16 +You should define the following variables inside the script:
17 +
18 +The path of MoinMoin shared files:
19 +SHARE=/usr/share/moin
20 +
21 +Define the user and the group of the web server:
22 +USER=www-data
23 +GROUP=www-data
24 +
25 + 3. Make it executable:
26 + "chmod u+x createinstance.sh"
27 +
28 + 4. Think about where you want the instance to be located. Like:
29 + "/usr/local/share/moin-instance"
30 +
31 + 4. Run the script with superuser rights like:
32 + "sudo ./createinstance.sh /usr/local/share/moin-instance"
33 +
34 diff -r fa6e150cec23 contrib/createinstance/createinstance.sh
35 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
36 +++ b/contrib/createinstance/createinstance.sh Sun May 06 18:40:08 2007 +0200
37 @@ -0,0 +1,38 @@
38 +#!/bin/bash
39 +
40 +# path of MoinMoin shared files
41 +SHARE=/usr/share/moin
42 +
43 +# path to target instance location
44 +INSTANCE=$1
45 +
46 +# the user and the group of the web server.
47 +USER=www-data
48 +GROUP=www-data
49 +
50 +if [ ! $1 ]
51 +then
52 + echo "You must specify an instance (relative or absolute path)"
53 + exit
54 +fi
55 +
56 +if [[ -e $1 || -d $1 ]]
57 +then
58 + echo "$1 already exists"
59 + exit
60 +fi
61 +
62 +mkdir -p $INSTANCE
63 +cp -R $SHARE/data $INSTANCE
64 +cp -R $SHARE/underlay $INSTANCE
65 +cp $SHARE/config/wikiconfig.py $INSTANCE
66 +
67 +chown -R $USER:$GROUP $INSTANCE
68 +chmod -R ug+rwX $INSTANCE
69 +chmod -R o-rwx $INSTANCE
70 +
71 +if [ $? ]
72 +then
73 + echo "Done."
74 +fi
75 +
76
Discussion
This can be fixed by reading EditingOnMoinMaster.
I think what would really be cool is if this would be a python script that also could use internals of moin. Maybe also the moin binary could be extended to support such action in future? -- ThiloPfennig 2007-05-06 16:53:18
Plan
- Priority:
- Assigned to:
- Status: