0

I have setup an odbc connection in linux that connects to MSSQL server:

This is the location and permission of .ini and inst files:

-rw-r--r--   1 root root   169 Aug  7 17:00 odbc.ini
-rw-r--r--   1 root root   188 Aug  7 16:40 odbcinst.ini

This is the permission to the mssql server driver:

-rwxrwxrwx 1 root root 1855896 Aug  7 16:39 /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0

When I am logged in as a user to the system, I do ls on that file, I get permission denied error, as follows:

~> ls -l /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0
ls: cannot access /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0: Permission denied

It has read, write, and execute permission for all users. When I am logged in as a user, not root, I cannot connect to the db from linux. When I am logged in as root, I can establish an ODBC connection the sql server. What I am doing wrong here. I need everyone to establish odbc connection.

user1471980
  • 10,127
  • 48
  • 136
  • 235

1 Answers1

0

others did not have permission on the drivers directory, this command fixed my issue:

chmod -R o+rx /opt/microsoft/msodbcsql/11.0.2260.0
user1471980
  • 10,127
  • 48
  • 136
  • 235