Skip to content

Bad permissions on emperor directory file cause segfault #70

Closed
bclermont opened this Issue Nov 29, 2012 · 5 comments

3 participants

@bclermont

I war running emperor with --uid www-data --gid www-data --ini /some/dir

but the directory permissions were d-wxrw---x

this caused the emperor to segfault!

@unbit
Owner
unbit commented Nov 29, 2012

sorry, can you report uWSGI version, and the config you are using ? what you have pasted is not an emperor invocation

@bclermont

version is 1.4.2

and it was compiled with this buildconf:

[uwsgi]
xml = false
ini = true
yaml = false
json = false
sqlite3 = false
zeromq = false
snmp = false
spooler = true
embedded = true
ssl = false
udp = true
multicast = false
threading = true
minterpreters = true
async = true
ldap = false
pcre = false
routing = false
alarm = false
ipv6 = false
debug = false
unbit = false
graylog2 = true
rack = true
xml_implementation = libxml2
yaml_implementation = auto
malloc_implementation = libc
extras =
plugins =
bin_name = uwsgi
append_version =
plugin_dir = .
embedded_plugins = rack, python, gevent, ping, nagios, carbon, signal, graylog2
as_shared_library = false

locking = auto
event = auto
timer = auto
filemonitor = auto

blacklist =
whitelist =

embed_files =

embed_config =

on ubuntu 12.04 64 bits.

@unbit
Owner
unbit commented Nov 30, 2012

so if you run

uwsgi --emperor foobar --uid www-data --gid www-data

and foobar has permissions 361 uwsgi segfaults ?

@prymitive
Collaborator

It works fine with 1.4.2:

~$ ls -lh
d-wxrw---x  2 lukasz.mierzwa users 4,0K 2012-12-05 15:35 test

~$ uwsgi --ini test
[uWSGI] getting INI configuration from test
open("test"): Permission denied [core/utils.c line 2603]

~$ uwsgi --ini test/xxx.ini
realpath() of test/xxx.ini failed: No such file or directory [core/utils.c line 4258]

~$ uwsgi --emperor test/*
*** Starting uWSGI 1.4.2 (64bit) on [Wed Dec  5 15:37:13 2012] ***
compiled with version: 4.4.3 on 26 November 2012 09:47:05
os: Linux-3.0.0-27-virtual #44~lucid1-Ubuntu SMP Fri Oct 19 16:05:20 UTC 2012
nodename: sudoku-dev-backend1
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 4
current working directory: /home/lukasz.mierzwa
detected binary path: /usr/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
*** starting uWSGI Emperor ***
^C[emperor] *** RAGNAROK EVOKED ***

~$ uwsgi --emperor test
*** Starting uWSGI 1.4.2 (64bit) on [Wed Dec  5 15:37:27 2012] ***
compiled with version: 4.4.3 on 26 November 2012 09:47:05
os: Linux-3.0.0-27-virtual #44~lucid1-Ubuntu SMP Fri Oct 19 16:05:20 UTC 2012
nodename: sudoku-dev-backend1
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 4
current working directory: /home/lukasz.mierzwa
detected binary path: /usr/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
*** starting uWSGI Emperor ***
chdir(): No such file or directory [core/emperor.c line 146]
^C[emperor] *** RAGNAROK EVOKED ***

Adding --uid www-data --gid www-data doesn't change anything, it still works.

@prymitive
Collaborator

Old issue, no feedback in 5 months, closing. Please reopen if issue is unresolved

@prymitive prymitive closed this Apr 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.