最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ubuntu - Permission Denied while opening shared object file in Flask - Stack Overflow

programmeradmin6浏览0评论

I am getting the error:

[client 192.168.1.44:60244] OSError: libBxlLabelAPI.so: cannot open shared object file: Permission denied

While trying to call:

libCalc = CDLL("/var/www/shippingServer/flask_contents/bixolon_print_connection/printLabel.so")

I am running the flask application with apache2 and in the WSGI Config I name the user as www-data:

WSGIDaemonProcess application user=www-data group=www-data 

I also checked permissions of the folder where libBxlLabelAPI.so is located (/usr/lib64) and changed it to www-data in an attempt to make it executable.

however the file itself/or the symlink is still root as owner. It also didn't work when I changed permissions to www-data.

Anybody encountered something similar?

Running Ubuntu 24.04.2 LTS And Flask with mod_wsgi on apache2

I am getting the error:

[client 192.168.1.44:60244] OSError: libBxlLabelAPI.so: cannot open shared object file: Permission denied

While trying to call:

libCalc = CDLL("/var/www/shippingServer/flask_contents/bixolon_print_connection/printLabel.so")

I am running the flask application with apache2 and in the WSGI Config I name the user as www-data:

WSGIDaemonProcess application user=www-data group=www-data 

I also checked permissions of the folder where libBxlLabelAPI.so is located (/usr/lib64) and changed it to www-data in an attempt to make it executable.

however the file itself/or the symlink is still root as owner. It also didn't work when I changed permissions to www-data.

Anybody encountered something similar?

Running Ubuntu 24.04.2 LTS And Flask with mod_wsgi on apache2

Share Improve this question asked Mar 17 at 13:07 Michael BaumgärtnerMichael Baumgärtner 3103 silver badges19 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

For anyone else observing this problem:

I had to do:

sudo ldconfig

Because apparently sometimes, the linker cache needs to be refreshed after adding new shared libraries.

发布评论

评论列表(0)

  1. 暂无评论