Opened 3 years ago

Closed 3 years ago

#2413 closed enhancement (fixed)

start_rasdaman.sh should exit if executed by root

Reported by: Dimitar Misev Owned by:
Priority: major Milestone: 10.0
Component: bin Version: 9.8
Keywords: Cc: Peter Baumann
Complexity: Medium

Description

Many people make a mistake of running start_rasdaman.sh as root, which messes up permissions and prevents further function with non-root users.

I'd suggest we add a check, if user is root then start_rasdaman.sh exits with an error.

However, it may break backwards compatibility: if someone was running rasdaman exclusively as root, they will find the error problematic. We can add a check for this case.

Change History (2)

comment:1 by Peter Baumann, 3 years ago

  • should be mentioned prominently in the documentation: "will not work properly under root, and is a high security risk"
  • I see the point for backwards compatibility, but even in this case we should print a prominent warning.

comment:2 by Dimitar Misev, 3 years ago

Resolution: fixed
Status: newclosed

I implemented it to exit if run with root, but added an option to allow overriding this. It's documented in the —help, as well as the manual.

$ sudo /opt/rasdaman/bin/start_rasdaman.sh
start_rasdaman.sh: starting rasdaman v10.0.0-beta2 build ga36ecaec9...
start_rasdaman.sh: starting rasdaman with root user is not recommended, please run 
start_rasdaman.sh with a non-root user. If you insist to run with root, 
start_rasdaman.sh must be executed with the --allow-root option.
Note: See TracTickets for help on using tickets.