Using ikiwiki via command line: Workflow and permission problem
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I use my ikiwiki for personal notes only on my laptop locally (the html pages are under ~/public_html/mywiki
) and now I am trying to edit it with emacs and push from command line.
I have some questions about this:
- Is the following workflow correct:
cd ~/mywiki
edit and save ~/mypage.mdwm
with emacs
git add ~/mypage.mdwm
git commit -m "mypage edit"
git push
Since I also sometimes want to edit it from the web interface, I tested it and noticed that it doesn't seem that I have to pull before editing. If I save an edit from the web interface the directory ~/mywiki
is updated magically without using git pull
.
Is this correct so far or is there a better workflow?
- After editing and saving the page from the web interface it is saved with root permissions in
~/mywiki
how can I make ikiwiki to save everything with my username as group and owner?
Note that I asked this question already on the ikiwiki forum a long time ago, I repost it here and hope to get help.
permissions git ikiwiki
add a comment |Â
up vote
1
down vote
favorite
I use my ikiwiki for personal notes only on my laptop locally (the html pages are under ~/public_html/mywiki
) and now I am trying to edit it with emacs and push from command line.
I have some questions about this:
- Is the following workflow correct:
cd ~/mywiki
edit and save ~/mypage.mdwm
with emacs
git add ~/mypage.mdwm
git commit -m "mypage edit"
git push
Since I also sometimes want to edit it from the web interface, I tested it and noticed that it doesn't seem that I have to pull before editing. If I save an edit from the web interface the directory ~/mywiki
is updated magically without using git pull
.
Is this correct so far or is there a better workflow?
- After editing and saving the page from the web interface it is saved with root permissions in
~/mywiki
how can I make ikiwiki to save everything with my username as group and owner?
Note that I asked this question already on the ikiwiki forum a long time ago, I repost it here and hope to get help.
permissions git ikiwiki
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I use my ikiwiki for personal notes only on my laptop locally (the html pages are under ~/public_html/mywiki
) and now I am trying to edit it with emacs and push from command line.
I have some questions about this:
- Is the following workflow correct:
cd ~/mywiki
edit and save ~/mypage.mdwm
with emacs
git add ~/mypage.mdwm
git commit -m "mypage edit"
git push
Since I also sometimes want to edit it from the web interface, I tested it and noticed that it doesn't seem that I have to pull before editing. If I save an edit from the web interface the directory ~/mywiki
is updated magically without using git pull
.
Is this correct so far or is there a better workflow?
- After editing and saving the page from the web interface it is saved with root permissions in
~/mywiki
how can I make ikiwiki to save everything with my username as group and owner?
Note that I asked this question already on the ikiwiki forum a long time ago, I repost it here and hope to get help.
permissions git ikiwiki
I use my ikiwiki for personal notes only on my laptop locally (the html pages are under ~/public_html/mywiki
) and now I am trying to edit it with emacs and push from command line.
I have some questions about this:
- Is the following workflow correct:
cd ~/mywiki
edit and save ~/mypage.mdwm
with emacs
git add ~/mypage.mdwm
git commit -m "mypage edit"
git push
Since I also sometimes want to edit it from the web interface, I tested it and noticed that it doesn't seem that I have to pull before editing. If I save an edit from the web interface the directory ~/mywiki
is updated magically without using git pull
.
Is this correct so far or is there a better workflow?
- After editing and saving the page from the web interface it is saved with root permissions in
~/mywiki
how can I make ikiwiki to save everything with my username as group and owner?
Note that I asked this question already on the ikiwiki forum a long time ago, I repost it here and hope to get help.
permissions git ikiwiki
permissions git ikiwiki
edited Aug 29 '17 at 12:18
asked Aug 28 '17 at 15:47
Anna19
133
133
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
ad question 1:
This seems to be correct. If you set git_wrapper
to git_wrapper: /home/user/mywiki/.git/hooks/post-commit
(instead of git_wrapper: /home/user/mywiki.git/hooks/post-update
you don't need the push step.
You may also think about another working clone of your wiki. But as long as you have a single user setup and you don't edit via web interface and editor at the same time, it should be fine to work inside scrdir
as you described. See also this question: Why do I need 3 git repositories for ikiwiki if I want to commit locally)
ad question 2:
I am not quite sure where the problem comes from, maybe that you did run ikiwiki
with sudo
during setup. I suggest the following to fix it:
Make sure, that
public_html
is owned by you (sudo chmod myuser:myuser ~/public_html
)Resetup the wiki via cloning:
- Clone the bare repository:
git clone --bare ~/mywiki.git ~/newiki.git
(even if the files inmywiki.git
are owned byroot
the files in~/newiki.git
will owened bymyuser
) cp ~/mywiki.git/config ~/newiki.git/config
- Make new
srcdir
:git clone ~/newiki.git ~/newiki
(~/newiki
will be your newsrcdir
)
- Clone the bare repository:
Make new config file:
cp ~/mywiki.setup ~/newiki.setup
and rename all occurences ofmywiki
withnewiki
.Then run (without sudo):
ikiwiki --setup newiki.setup --getctime
Test in your browser:
127.0.0.1/~myuser/newiki
If everything works you may (after an backup) delete mywiki
and rename newiki
to mywiki
if you want.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
ad question 1:
This seems to be correct. If you set git_wrapper
to git_wrapper: /home/user/mywiki/.git/hooks/post-commit
(instead of git_wrapper: /home/user/mywiki.git/hooks/post-update
you don't need the push step.
You may also think about another working clone of your wiki. But as long as you have a single user setup and you don't edit via web interface and editor at the same time, it should be fine to work inside scrdir
as you described. See also this question: Why do I need 3 git repositories for ikiwiki if I want to commit locally)
ad question 2:
I am not quite sure where the problem comes from, maybe that you did run ikiwiki
with sudo
during setup. I suggest the following to fix it:
Make sure, that
public_html
is owned by you (sudo chmod myuser:myuser ~/public_html
)Resetup the wiki via cloning:
- Clone the bare repository:
git clone --bare ~/mywiki.git ~/newiki.git
(even if the files inmywiki.git
are owned byroot
the files in~/newiki.git
will owened bymyuser
) cp ~/mywiki.git/config ~/newiki.git/config
- Make new
srcdir
:git clone ~/newiki.git ~/newiki
(~/newiki
will be your newsrcdir
)
- Clone the bare repository:
Make new config file:
cp ~/mywiki.setup ~/newiki.setup
and rename all occurences ofmywiki
withnewiki
.Then run (without sudo):
ikiwiki --setup newiki.setup --getctime
Test in your browser:
127.0.0.1/~myuser/newiki
If everything works you may (after an backup) delete mywiki
and rename newiki
to mywiki
if you want.
add a comment |Â
up vote
1
down vote
accepted
ad question 1:
This seems to be correct. If you set git_wrapper
to git_wrapper: /home/user/mywiki/.git/hooks/post-commit
(instead of git_wrapper: /home/user/mywiki.git/hooks/post-update
you don't need the push step.
You may also think about another working clone of your wiki. But as long as you have a single user setup and you don't edit via web interface and editor at the same time, it should be fine to work inside scrdir
as you described. See also this question: Why do I need 3 git repositories for ikiwiki if I want to commit locally)
ad question 2:
I am not quite sure where the problem comes from, maybe that you did run ikiwiki
with sudo
during setup. I suggest the following to fix it:
Make sure, that
public_html
is owned by you (sudo chmod myuser:myuser ~/public_html
)Resetup the wiki via cloning:
- Clone the bare repository:
git clone --bare ~/mywiki.git ~/newiki.git
(even if the files inmywiki.git
are owned byroot
the files in~/newiki.git
will owened bymyuser
) cp ~/mywiki.git/config ~/newiki.git/config
- Make new
srcdir
:git clone ~/newiki.git ~/newiki
(~/newiki
will be your newsrcdir
)
- Clone the bare repository:
Make new config file:
cp ~/mywiki.setup ~/newiki.setup
and rename all occurences ofmywiki
withnewiki
.Then run (without sudo):
ikiwiki --setup newiki.setup --getctime
Test in your browser:
127.0.0.1/~myuser/newiki
If everything works you may (after an backup) delete mywiki
and rename newiki
to mywiki
if you want.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
ad question 1:
This seems to be correct. If you set git_wrapper
to git_wrapper: /home/user/mywiki/.git/hooks/post-commit
(instead of git_wrapper: /home/user/mywiki.git/hooks/post-update
you don't need the push step.
You may also think about another working clone of your wiki. But as long as you have a single user setup and you don't edit via web interface and editor at the same time, it should be fine to work inside scrdir
as you described. See also this question: Why do I need 3 git repositories for ikiwiki if I want to commit locally)
ad question 2:
I am not quite sure where the problem comes from, maybe that you did run ikiwiki
with sudo
during setup. I suggest the following to fix it:
Make sure, that
public_html
is owned by you (sudo chmod myuser:myuser ~/public_html
)Resetup the wiki via cloning:
- Clone the bare repository:
git clone --bare ~/mywiki.git ~/newiki.git
(even if the files inmywiki.git
are owned byroot
the files in~/newiki.git
will owened bymyuser
) cp ~/mywiki.git/config ~/newiki.git/config
- Make new
srcdir
:git clone ~/newiki.git ~/newiki
(~/newiki
will be your newsrcdir
)
- Clone the bare repository:
Make new config file:
cp ~/mywiki.setup ~/newiki.setup
and rename all occurences ofmywiki
withnewiki
.Then run (without sudo):
ikiwiki --setup newiki.setup --getctime
Test in your browser:
127.0.0.1/~myuser/newiki
If everything works you may (after an backup) delete mywiki
and rename newiki
to mywiki
if you want.
ad question 1:
This seems to be correct. If you set git_wrapper
to git_wrapper: /home/user/mywiki/.git/hooks/post-commit
(instead of git_wrapper: /home/user/mywiki.git/hooks/post-update
you don't need the push step.
You may also think about another working clone of your wiki. But as long as you have a single user setup and you don't edit via web interface and editor at the same time, it should be fine to work inside scrdir
as you described. See also this question: Why do I need 3 git repositories for ikiwiki if I want to commit locally)
ad question 2:
I am not quite sure where the problem comes from, maybe that you did run ikiwiki
with sudo
during setup. I suggest the following to fix it:
Make sure, that
public_html
is owned by you (sudo chmod myuser:myuser ~/public_html
)Resetup the wiki via cloning:
- Clone the bare repository:
git clone --bare ~/mywiki.git ~/newiki.git
(even if the files inmywiki.git
are owned byroot
the files in~/newiki.git
will owened bymyuser
) cp ~/mywiki.git/config ~/newiki.git/config
- Make new
srcdir
:git clone ~/newiki.git ~/newiki
(~/newiki
will be your newsrcdir
)
- Clone the bare repository:
Make new config file:
cp ~/mywiki.setup ~/newiki.setup
and rename all occurences ofmywiki
withnewiki
.Then run (without sudo):
ikiwiki --setup newiki.setup --getctime
Test in your browser:
127.0.0.1/~myuser/newiki
If everything works you may (after an backup) delete mywiki
and rename newiki
to mywiki
if you want.
answered Aug 13 at 13:23
student
6,6381663113
6,6381663113
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f388870%2fusing-ikiwiki-via-command-line-workflow-and-permission-problem%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password