1. By default the writable external file is created with permission set “600”, which means that nobody but gpadmin can actually read this file. 2. It is not advisable to change any configuration parameter to change the default behavior due the data security reasons. I am pretty sure that there is no such parameter in the configuration file. I will double check it . 3. Admin can always change the file permission to 666 as required. Please see a sample test case below. [gpadmin@sachi ~]$ gpfdist -d /home/gpadmin/loadfiles/ -p 8081 & [1] 553 [gpadmin@sachi ~]$ Serving HTTP on port 8081, directory /home/gpadmin/loadfiles [gpadmin@sachi ~]$ ps -ef|grep gpfdist gpadmin 553 32674 0 09:26 pts/3 00:00:00 gpfdist -d /home/gpadmin/loadfiles/ -p 8081 gpadmin 555 32674 0 09:26 pts/3 00:00:00 grep gpfdist [gpadmin@sachi ~]$ psql -d sachi psql (8.2.15) Type "help" for help. sachi=# create WRITABLE EXTERNAL TABLE sachitest ( sachi(# name varchar(20), age int) sachi-# LOCATION ('gpfdist://sachi:8081/ext_sachi.out') sachi-# FORMAT 'CUSTOM' (formatter=fixedwidth_out, name=20, age=4, line_delim=E'\r\n'); CREATE EXTERNAL TABLE sachi=# [gpadmin@sachi ~]$ ps -ef|grep gpfdist gpadmin 553 32674 0 09:26 pts/3 00:00:00 gpfdist -d /home/gpadmin/loadfiles/ -p 8081 gpadmin 897 32674 0 09:37 pts/3 00:00:00 grep gpfdist [gpadmin@sachi ~]$ ls -l /home/gpadmin/loadfiles/ total 4 -rw-------. 1 gpadmin gpadmin 52 Jan 31 09:35 ext_sachi.out [gpadmin@sachi ~]$ cd /home/gpadmin/loadfiles/ [gpadmin@sachi loadfiles]$ ll total 4 -rw-------. 1 gpadmin gpadmin 52 Jan 31 09:35 ext_sachi.out [gpadmin@sachi loadfiles]$ chmod 666 ext_sachi.out [gpadmin@sachi loadfiles]$ ll total 4 -rw-rw-rw-. 1 gpadmin gpadmin 52 Jan 31 09:35 ext_sachi.out [gpadmin@sachi loadfiles]$ In our example above, the gpadmin user on the DIA could create the extract file at the Linux command line (and leave it empty) prior to starting up the gpfdist service: touch /home/gpadmin/loadfiles/ext_sachi.out As a one-time verification, at this point we can check the permissions of the empty file to make sure gpadmin is creating files that the world can see. If so, the rest of the example can be executed and the need to kick around file permissions at the end of the process would be precluded. Since the file already exists at the time of the unload operation, the existing permissions will be respected. echo > /home/gpadmin/loadfiles/ext_sachi.out This will empty the file out thus ensuring this "unload" only contains this run's data. |