pattersonkl / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

Binaries under 'root' user on *nix #295

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'd like to have all binaries in /opt/google-refine-2.0 folder saved under 
'root' user. So the folder is read-only for all desktop users.

The problem is that google-refine script tries to make some manipulations with 
settings file right in the base folder. It tries to create new setting file, 
import it and delete it.

It leads to problem in line 806 if folder is read-only so makes such an usage 
impossible.

The solution is to use standard mktemp utility.

load_configs() {
    TEMP_CONFIG=$(mktemp)
    cat $1 | egrep "^[A-Z]" | sed 's/^\(.*\)$/export \1/' > ${TEMP_CONFIG}
    . ${TEMP_CONFIG}
    rm ${TEMP_CONFIG}
}

I believe that keeping all binaries read-only is the only proper way under any 
*nix system.

Original issue reported on code.google.com by mazurkin on 24 Dec 2010 at 6:11

GoogleCodeExporter commented 8 years ago
Landed in trunk at r1956.

Original comment by stefa...@google.com on 24 Dec 2010 at 8:06

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 9 Jun 2011 at 7:58