Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running as root gives insufficient permissions #27

Closed
denis-cto opened this issue Feb 25, 2016 · 1 comment
Closed

Running as root gives insufficient permissions #27

denis-cto opened this issue Feb 25, 2016 · 1 comment

Comments

@denis-cto
Copy link

    -- PDOException code: 42501
    -- File: /root/FromMySqlToPostgreSql-master/migration/FromMySqlToPostgreSql/FromMySqlToPostgreSql.php
    -- Line: 791
    -- Message: SQLSTATE[42501]: Insufficient privilege: 7 ERROR:  could not open file "/root/FromMySqlToPostgreSql-master/temporary_directory/allactions0.csv" for reading: Permission denied
    -- SQL: COPY "arierra"."allactions" FROM '/root/FromMySqlToPostgreSql-master/temporary_directory/allactions0.csv' DELIMITER ',' CSV;

Script was downloaded by root and is running by root.

@AnatolyUss
Copy link
Owner

Hi,
In your connection string to PostgreSQL you should be a superuser (usually "postgres").
For more info:
https://wiki.postgresql.org/wiki/COPY
http://www.postgresql.org/docs/current/static/app-createuser.html
http://www.postgresql.org/docs/current/static/sql-alteruser.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants