ERROR 4368 while copy data from file to Table

While loading data via COPY command, it throws error "ERROR 4368 - Permission denied for storage location [/home/xxxxx/Product_Dimension.tbl]" and seems it can be loaded only via vsql using cat command to read the file and use STDIN. I have to load many files in a batch and direct load doesn't work, it will take addition effort to load one by one files.


  • Options
    Hi Chandra,

    There are two solutions here:

    First, you could use COPY LOCAL.  COPY LOCAL allows you to specify multiple filenames to load through vsql.

    Second, you are likely getting this error because your Vertica user doesn't have permission to read data from this storage location.  In which case you could either run as your dbadmin account, or ask your database administrator to create a storage location of the appropriate type and with the appropriate path so that you have permission to load the files in question:


    The second approach will get you better performance.  (COPY LOCAL still only loads one file at a time; it just loads a bunch of files automatically.  We assume that you are running vsql remotely so network bandwidth is likely to be the bottleneck for you.  Regular COPY can load many files simultaneously, in some cases utilizing more CPU cores to parse the files.)

  • Options
    Thanks Adam. Let me try the second option. Actually this should be part of installation of vertica itself. Since, the permission is not for any local user but for the "vertica" user...it should be part of installation.
    Yes, I am using vsql remotely but loading via COPY only. Thanks again.

  • Options
    Hi Chandra,  so, the "dbadmin" user is the only user that exists at installation time, and that user is granted access to all locations.

    We could consider adding a file-permissions stage to installation.  Realistically, in my experience at least, many first-time users just use the "dbadmin" Vertica role (the one created during installation that has full general access); and once installations become big enough to be multi-user, each such installation is a little different and most need a lot more than just storage locations in order to be generally useful.  Realistically, managing any real multi-user system means understanding that system.  (Otherwise you're as likely to configure it for someone else's use case as for your own -- a significant fraction of our users don't grant shell access to most Vertica account-holders and don't want them to have any local-filesystem access.)  We could certainly make that easier; our Management Console already provides some assistance in setting up a Vertica cluster (and a nice graphical installer for Vertica itself, etc) but I don't think it yet addresses COPY storage locations in particular.
  • Options
    Honestly, this is product flaws...at first place itself it should be reading it from the location where data-files are placed. Irrespective of anything. and files are having appropriate permissions to read..Simple as it should..

  • Options
    It sounds like you would like all users to have full access to your system.  Is there a reason you are choosing to use restricted user accounts?
  • Options
    (I'm not complaining -- I'm just trying to understand your scenario.)

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file