#4534 (getlino startsite doesn't work correctly unless running as root)
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
Children
Comments
- 4 years, 1 month ago by Sharif Mehedi about #4534 (getlino startsite doesn't work correctly unless running as root) : we can have an shell alias sudogetlino for the command "sudo -E env PATH=$PATH getlino" which should work fine locally with sudo.
- 4 years, 5 months ago by Luc Saffre about #4534 (getlino startsite doesn't work correctly unless running as root) : Made another session on the welcht preview server with sharif. Some optimizations. But basically it is now quite straighforward to use getlino startsite multiple times.
- 4 years, 5 months ago by Luc Saffre about #4534 (getlino startsite doesn't work correctly unless running as root) : After a bed session I checked my work again and found at least one misbehaviour.
- 4 years, 5 months ago by Luc Saffre about #4534 (getlino startsite doesn't work correctly unless running as root) : I committed my changes and believe that this should work now for the new welcht production server. But I didn't run the local test suite because it is under development. And anyway these situations are not yet covered by the test suite.
- 4 years, 5 months ago by Luc Saffre about #4534 (getlino startsite doesn't work correctly unless running as root) : I seem to see what to do next: change startsite so that it can be executed repeatedly on a same site. And later remove the runcmd_sudo() feature because it was nonsense. Creating a new site on a production server requires you to be root because it is going to fiddle at system level, basta. The first...
- 4 years, 5 months ago by Luc Saffre about #4534 (getlino startsite doesn't work correctly unless running as root) : I wrote getlino.utils.Installer.runcmd_sudo() so that getlino itself can run a command under sudo. I start to realize that my idea was the wrong approach: it works only for running subprocesses, not when creating files. I invented runcmd_sudo() because sudo doesn't forward the PATH to the subprocess...
- 4 years, 5 months ago by Luc Saffre about #4534 (getlino startsite doesn't work correctly unless running as root) : We want a normal maintainer (not root, but having sudo rights) to be able to run startsite on a production server. But right now, in that case, getlino accepts to do the job and then leaves a part of it undone: make_snapshots.sh, nginx files, log directory: they all were simply not created. And getl...