What will be default file permissions of csv output file created by neo4j using call apoc.export.csv

Hi Team,

I am using neo4j on linux server.

Want to know what will be default file permissions of output csv file created by neo4j using call apoc.export.csv??

Regards
Akshat

I ran this query:

And then these are the file permissions:

$ ls -alh import/
total 6.6M
drwxr-xr-x  2 markhneedham markhneedham 4.0K Jun 26 11:06 .
drwxr-xr-x 12 markhneedham markhneedham 4.0K Jun 17 17:56 ..
-rw-r--r--  1 markhneedham markhneedham 6.6M Jun 26 11:06 foo.csv

So I make that 644 in terms of chmod value.

Hi Mark,

Thanks for quick reply.

I am using the same query but csv output path is not import.
And csv file permissions is below-

[sineoj@jmngdprv009693 csv_archive]$ ls -lrth

-rw-r----- 1 sineoj neo4j 2.2G Jun 24 08:07 RAN_NOCAPP_24-06-2020-08:07:46.csv

-rw-r----- 1 sineoj neo4j 2.2G Jun 25 08:07 RAN_NOCAPP_25-06-2020-08:07:38.csv

-rw-r----- 1 sineoj neo4j 2.2G Jun 26 08:07 RAN_NOCAPP_26-06-2020-08:07:24.csv

I am not sure why this permission is coming?

Mark , Any idea !!

Regards
Akshat

This is the code that does the file creation - neo4j-apoc-procedures/FileUtils.java at 5e4fa9c4b7023aae046f8899e8b2723d564af242 · neo4j-contrib/neo4j-apoc-procedures · GitHub

I can't see anything on there that would create different permissions whether using the import directory or not. The import directory for me has chmod of 755 - maybe the directory you're writing to has lower permissions than that?

Hello Mark,

Below are the permissions on my system,

[sineoj@jmngdprv009693 neo4j-enterprise-3.5.3]$ ls -lrth

total 296K

drwxrwsr-x 2 sineoj neo4j 4.0K Mar 26 16:54 certificates

drwxrwsr-x 4 sineoj neo4j 4.0K Mar 26 16:55 data

-rwxrwxr-x 1 sineoj neo4j 96 Mar 26 16:55 UPGRADE.txt

drwxrwsr-x 2 sineoj neo4j 16K Mar 26 16:55 lib

-rwxrwxr-x 1 sineoj neo4j 1.7K Mar 26 16:56 README.txt

-rwxrwxr-x 1 sineoj neo4j 163K Mar 26 16:56 LICENSES.txt

drwxrwsr-x 2 sineoj neo4j 4.0K Mar 26 16:56 plugins

-rwxrwxr-x 1 sineoj neo4j 23K Mar 26 16:56 LICENSE.txt

-rwxrwxr-x 1 sineoj neo4j 135 Mar 26 16:56 NOTICE.txt

drwxrwsr-x 2 sineoj neo4j 4.0K May 11 18:51 conf

drwxrwsr-x 2 sineoj neo4j 4.0K May 13 13:33 logs

drwxrwsr-x 3 sineoj neo4j 4.0K May 28 19:06 bin

drwxrwsr-x 2 sineoj neo4j 4.0K Jun 24 05:41 run

drwxrwsr-x 2 sineoj neo4j 48K Jun 26 13:08 metrics

drwxrwsr-x 3 sineoj neo4j 4.0K Jun 26 14:30 import

[sineoj@jmngdprv009693 neo4j-enterprise-3.5.3]$ cd ..

[sineoj@jmngdprv009693 neo4japp]$ cd neo4j_automation

[sineoj@jmngdprv009693 neo4j_automation]$ ls -lrth

total 40K

drwxrwsr-x 5 sineoj neo4j 4.0K Jun 26 08:00 NOCAPP

[sineoj@jmngdprv009693 neo4j_automation]$ cd NOCAPP/

[sineoj@jmngdprv009693 NOCAPP]$ ll

-rw-r----- 1 sineoj neo4j 2.2G Jun 26 08:07 RAN_NOCAPP_26-06-2020-08:07:24.csv

Regards
Akshat

Hello Mark,

Please provide your input.

Regards
Akshat