apache-config returns "you must be root" even if user is root : problem with $UID
Bug #186207 reported by
Rémi BOULLE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wims (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: wims
Here are the steps :
1/ $sudo apt-get install wims (and all dependencies)
2/ $sudo su
3/ $./var/
It returns : "This script adds WIMS-related definitions to Apache config. It must be run as root. su to root before running this script!"
The part of /var/lib/
********
if [ ! "$UID" = 0 ]; then
echo
echo This script adds WIMS-related definitions to Apache config.
echo It must be run as root.
echo
echo su to root before running this script!
echo
echo
exit
fi
*********
I just commented this out and it worked. Strange.
Changed in wims: | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in wims (Ubuntu): | |
status: | Triaged → Incomplete |
To post a comment you must log in.
Replace
if [ ! "$UID" = 0 ]; then
by
if [ ! "$(id -ru )" = 0 ]; then
the first syntax seems to be a "bashism" not compatible with unbuntu
https:/ /wiki.ubuntu. com/DashAsBinSh
It has been corrected in the svn version sourcesup. cru.fr/ projects/ wimsdev
http://
Bernadette