Easysoft
ODBC Drivers for Oracle, SQL Server, Firebird, ISAM, InterBase, Sybase, MS Access & more.

Easysoft Data Access

Why do I get error "cannot restore segment prot after reloc: Permission denied"?

Article : 00976
Last Reviewed : 10th December 2007
Revision : 1

If your Linux distribution has Security-enhanced Linux (SELinux) enabled, you may get error "cannot restore segment prot after reloc: Permission denied" when using an Easysoft ODBC driver. This error occurs because the Easysoft ODBC driver libraries require text relocation, but the SELinux policy on your machine prevents this. To work around this, change the SELinux policy to allow the use of libraries that require text relocation. To do this, as root, run:

chcon -t texrel_shlib_t

This example output uses the Easysoft ODBC-SQL Server Driver to illustrate the error and the workaround:

# isql -v mydsn
[01000][unixODBC][Driver Manager]Can't open lib 
'/usr/local/easysoft/sqlserver/lib/libessqlsrv.so' : 
/usr/local/easysoft/sqlserver/lib/libessqlsrv.so: cannot restore segment 
prot after reloc: Permission denied
[ISQL]ERROR: Could not SQLConnect
# dltest /usr/local/easysoft/sqlserver/lib/libessqlsrv.so
[dltest] ERROR dlopen: /usr/local/easysoft/sqlserver/lib/libessqlsrv.so: 
cannot restore segment prot after reloc: Permission denied
# chcon -t texrel_shlib_t 
/usr/local/easysoft/sqlserver/lib/libessqlsrv.so
# dltest /usr/local/easysoft/sqlserver/lib/libessqlsrv.so
SUCCESS: Loaded /usr/local/easysoft/sqlserver/lib/libessqlsrv.so
Applies To

Knowledge Base Feedback

* Did this content help you?
Yes
No
Maybe
 
* Please select one option based on your first choice:
I'm very satisfied
I think it will help, but I haven't tried it yet
It is helpful, but I need more information
It is helpful, but hard to understand
Seemed relevant in search results, but didn't help me
The information is incorrect
The page contains one or more broken links
 
  Suggest new content or let us know how we can improve this content:

 
  (* Required Fields)   



© 1993 - 2012 Easysoft Limited. All rights reserved.