Load data from user home directory


#1

Hello,

I’m working through the guide (13.1) and would like to load files from my home directory, but load(‘file’) claims that ‘file’ does not exist.

pyrope scidb $ pwd /home/rmason/test/scidb pyrope scidb $ ls -l total 8 -rw-r--r-- 1 rmason rmason 78 Mar 9 14:41 datafile.scidb -rw-r--r-- 1 rmason rmason 123 Mar 10 12:25 m4x4_missing.txt pyrope scidb $ iquery AQL% set lang afl; AFL% load(m4x4_missing, '/home/rmason/test/scidb/m4x4_missing.txt'); UserQueryException in file: src/query/ops/input/LogicalInput.cpp function: inferSchema line: 174 Error id: scidb::SCIDB_SE_INFER_SCHEMA::SCIDB_LE_FILE_NOT_FOUND Error description: Error during schema inferring. File '/home/rmason/test/scidb/m4x4_missing.txt' not found. load(m4x4_missing, '/home/rmason/test/scidb/m4x4_missing.txt') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Failed query id: 1100874765392

If I copy the file to /tmp, I can load it without problems.

Is there something I must do to enable file loading from an arbitrary directory?

Thanks,
Roger


#2

Strange.

No, there should not be anything special you need to do. Is this a permissions issue maybe? Are you running scidb as a different user who cannot view contents of /home/rmason/ ?


#3

Thanks for your reply.

I start scidb as the scidb user, according to the instructions in the manual. The database is in /home/scidb/.
All work with the db is carried out by rmason, in /home/rmason.

Roger


#4

So can you try:

sudo su scidb
cat /home/rmason/test/scidb/m4x4_missing.txt

See if that works. Since the scidb executable is started by user scidb it inherits permissions for that user. And it’s very possible that that user cannot access /home/rmason


#5

sudo su scidb
[scidb@cryptoperthite Database]$ cat /home/rmason/test/scidb/m4x4_empty.scidb
cat: /home/rmason/test/scidb/m4x4_empty.scidb: Permission denied

Thanks,
Roger