[Live-demo] write access to /usr/local/share/data/

Hamish hamish_b at yahoo.com
Thu Mar 3 00:13:25 PST 2011


Astrid wrote:
> I am working in the gdal_quickstart at the moment and use
> the natural_earth data.
> 
> For the exercises I need write access to the directory as
> we create new data with the gdal-tools.

Have an earlier step which copies data into a working directory, or use
relative path names to data files on the command line (something like
$HOME/data/ exists as a symlink to /usr/local/share/data/ I think)

AFAIK gdal tools never edit data files in-place, they always make a new map,
so original files stay read-only too.

 
> DATA_FOLDER="/usr/local/share/data"
> 
> This is what is defined at the meoment in the file install_gisdata.sh:
> chmod a+r "$DATA_FOLDER/natural_earth"    ## read the data dir
> chmod 444  $DATA_FOLDER/natural_earth/*   ##  and all files in it
> chmod -R +X "$DATA_FOLDER/natural_earth"  ## but keep x on directories
> 
> Is it ok to set :
> 
> chmod -R u+w "$DATA_FOLDER"     ## write the data dir

No, use g+w if you absolutely must, then make sure the dir is owned by root.users   ... but the user shouldn't be allowed to write there at all.


> I am fine to set write access only to the /natural_earth
> firectory too:
> 
> chmod -R u+w "$DATA_FOLDER/natural_earth"    ## write the natural_earth
> data dir
>
> So the user can write to the data dir. 

No, things should be set up so user works in their own sandbox.



thanks,
Hamish



      



More information about the Osgeolive mailing list