You are not logged in.

#26 2018-06-23 21:48:50

seth
Member
Registered: 2012-09-03
Posts: 50,009

Re: [SOLVED] How to let normal user run chroot without password?

Adding the command to the NOPASSWD sudoers will allow you to sudo the command (sudo is essentially a wrapper) w/o being asked for your password.
If at some point this apparently didn't work, the sudoer entry was likely not correct (but that's impossible to recreate)

Offline

#27 2018-06-24 11:25:51

ss
Member
Registered: 2018-06-04
Posts: 89

Re: [SOLVED] How to let normal user run chroot without password?

ss wrote:

Moreover, how could I update the pages without restarting the webserver? With make serve running in another terminal, I thought I could edit the markdown files in a text editor, then run make clean && make to regenerate the static pages. But I got 403 error in the browser. EDIT: I get 404 error, although I remember it was 403, but can't reproduce it anymore, maybe I just misread the message.

Strangely, if I manually edit the html files of the static site, I can see the update in a web browser without restarting quark. What am I missing here?

The problem is that the root of web directory should not be deleted. My solution is, instead of simply removing the folder of the static site during page generation, I add another public folder which is served by quark and rsync with the static site. Here is the Makefile

SOURCEDIR=/path/to/mysite
PUBLICDIR=/path/to/mysite.public
DESTDIR=/path/to/mysite.static
IP=192.168.0.99

all:
        ./sw $(SOURCEDIR)
        rsync -avz $(DESTDIR)/ $(PUBLICDIR)/
clean:
        rm -rf $(DESTDIR)
serve:
        sudo quark -h "${IP}" -p 8888 -g http -d $(PUBLICDIR)

Offline

Board footer

Powered by FluxBB