Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4853

allow cpimport to work when run with non-super user (like mysql)

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Won't Do
    • None
    • 23.02.1
    • ?
    • None

    Description

      Currently, to use cpimport you need to use root or another superuser. For security reasons, clients would like to use a non-super user to allow DBAs or automation to use cpimport without escalated privileges.

      The below steps reproduce the error when trying to hack around and make this work
      Error calling chown() with uid 997 and gid 994 with the file /var/lib/columnstore/data1/bulkRollback with errno 1 [1071]

      mariadb  -e "drop table test_table;"
      mariadb  -e "drop database test;"
      mariadb  -e "create database test;"
      mariadb test -e "CREATE TABLE test_table (group_name CHAR(2), number1 DECIMAL(12, 2), number2 DECIMAL(12, 2), var varchar(1)) ENGINE=COLUMNSTORE;"
      useradd cpuser
      usermod -a -G mysql cpuser
      usermod -a -G cpuser mysql 
      # make sure `pwd` is the same dir as the file being imported else different error occurs
      cd /tmp/
      chmod -R 775 /var/lib/columnstore/data1/
      sudo su cpuser
      touch test.csv
      echo '"6",7800.18,0.18,"a"' > test_table.csv
      cpimport test test_table /tmp/test_table.csv -s "," -e "\"" -d 3
       
      Error calling chown() with uid 997 and gid 994 with the file /var/lib/columnstore/data1/bulkRollback with errno 1 [1071]
      

      Attachments

        Issue Links

          Activity

            People

              tntnatbry Gagan Goel (Inactive)
              allen.herrera Allen Herrera
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.