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

AppArmor gives DENIED error on Ubuntu 14.04 #261

Closed
fpietrosanti opened this issue Nov 9, 2015 · 5 comments
Closed

AppArmor gives DENIED error on Ubuntu 14.04 #261

fpietrosanti opened this issue Nov 9, 2015 · 5 comments
Labels

Comments

@fpietrosanti
Copy link
Contributor

root@XXXXXX:/home/tor2web/certs# /etc/init.d/tor2web start

  • Enabling Tor2web Apparmor Sandboxing... * Starting Tor2web tor2web... * Starting tor daemon... [ OK ]
    Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/tor2web/t2w.py", line 31, in
    from zope.interface import implements
    ImportError: No module named interface
    Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/tor2web/t2w.py", line 31, in
    from zope.interface import implements
    ImportError: No module named interface

[705907.117463] type=1400 audit(1447069889.677:40): apparmor="DENIED" operation="exec" profile="usr.bin.tor2web" name="/bin/uname" pid=17464 comm="sh" requested_mask="x" denied_mask="x" fsuid=0 ouid=0

By disabling apparmor, starting tor2web, stopping it, enabling apparmor again, everything works.

This problem happen at first installation only.

[706693.770297] type=1400 audit(1447070676.330:215): apparmor="DENIED" operation="exec" profile="usr.bin.tor2web" name="/bin/uname" pid=19205 comm="sh" requested_mask="x" denied_mask="x" fsuid=0 ouid=0
[706677.975865] type=1400 audit(1447070660.534:97): apparmor="DENIED" operation="mknod" profile="usr.bin.tor2web" name="/usr/lib/python2.7/dist-packages/tor2web/init.pyc" pid=19147 comm="python" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[706677.975972] type=1400 audit(1447070660.534:98): apparmor="DENIED" operation="mknod" profile="usr.bin.tor2web" name="/usr/lib/python2.7/dist-packages/tor2web/utils/init.pyc" pid=19147 comm="python" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[706677.978506] type=1400 audit(1447070660.538:99): apparmor="DENIED" operation="mknod" profile="usr.bin.tor2web" name="/usr/lib/python2.7/dist-packages/tor2web/utils/config.pyc" pid=19147 comm="python" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[706677.981538] type=1400 audit(1447070660.542:100): apparmor="DENIED" operation="mknod" profile="usr.bin.tor2web" name="/usr/lib/python2.7/dist-packages/tor2web/utils/storage.pyc" pid=19147 comm="python" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[706677.983433] type=1400 audit(1447070660.542:101): apparmor="DENIED" operation="mknod" profile="usr.bin.tor2web" name="/usr/lib/python2.7/dist-packages/tor2web/utils/daemon.pyc" pid=19147 comm="python" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[706693.755913] audit_printk_skb: 330 callbacks suppressed
[706693.755920] type=1400 audit(1447070676.314:212): apparmor="DENIED" operation="mknod" profile="usr.bin.tor2web" name="/usr/lib/python2.7/dist-packages/tor2web/init.pyc" pid=19203 comm="tor2web" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[706693.756041] type=1400 audit(1447070676.314:213): apparmor="DENIED" operation="mknod" profile="usr.bin.tor2web" name="/usr/lib/python2.7/dist-packages/tor2web/utils/init.pyc" pid=19203 comm="tor2web" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[706693.757745] type=1400 audit(1447070676.318:214): apparmor="DENIED" operation="mknod" profile="usr.bin.tor2web" name="/usr/lib/python2.7/dist-packages/tor2web/utils/daemon.pyc" pid=19203 comm="tor2web" requested_mask="c" denied_mask="c" fsuid=0 ouid=0

@evilaliv3
Copy link
Contributor

damn, this is due to the fact that we do not test extensively on Ubuntu 14.04!

time to apply the same concept of testing of GLAppliance/Jenkins and at least to improve the unit testing of this stuff!

@evilaliv3 evilaliv3 modified the milestone: 3.2 Dec 23, 2015
@evilaliv3
Copy link
Contributor

@DrWhax this is one of the issues you were encountering but this error does not cause any malfunctions. i will ty anyhow to inverstigate it's reason.

@evilaliv3
Copy link
Contributor

I've applied the same fix as done in globaleaks; no malfunctions were caused by the way.

@fpietrosanti
Copy link
Contributor Author

Opened issue on pip to fix the problem on pip side pypa/pip#3442

@evilaliv3
Copy link
Contributor

definitely not an issue of pip, but eventually with python.

the os library of python use uname and exec internally.

evilaliv3 added a commit that referenced this issue Jan 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants