[Openstack] [swift] permission denied errors during swift-init start main
Clay Gerrard
clay.gerrard at gmail.com
Thu Aug 15 02:54:17 UTC 2013
I think you're running an older version of swift, but I'm pretty sure that
loadapp line is right after drop_privledges in run_wsgi.
So the process starts as root, and can read the config - then it drops
privileges to the run user configured in the conf and can't access the file
anymore.
... but everything you pasted looks right.
You should make sure you can read the file as swift (`su - swift; cat
/etc/swift/account-server.conf`), you should make sure the pwd.getpwnam
isn't some how mis reading the "[DEFAULT] user = swift" option (`python -c
"import pwd, swift.common.utils; assert 'swift'
== pwd.getpwnam(swift.common.utils.readconf('/etc/swift/account-server/1.conf',
'app:account-server')['user'])[0]"`
-Clay
On Wed, Aug 14, 2013 at 6:59 PM, Snider, Tim <Tim.Snider at netapp.com> wrote:
> Through an unfortunate series of events I get "permission denied" trying
> to start the account, container, and object server. Circumstantial evidence
> points to (maybe) the swift user/group or something with syslog being
> messed up. If someone could give me some pointers I'd appreciate it. This
> happens for all servers. I've included just the account-server dump for
> ease.
> Thanks,
> Tim
>
>
> root at swift21:/home/swift#
> root at swift21:/home/swift# swift-init start account-server
> Starting account-server...(/etc/swift/account-server.conf)
> Traceback (most recent call last):
> File "/usr/bin/swift-account-server", line 22, in <module>
> run_wsgi(conf_file, 'account-server', default_port=6002, **options)
> File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 122,
> in run_wsgi
> loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line
> 247, in loadapp
> return loadobj(APP, uri, name=name, **kw)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line
> 271, in loadobj
> global_conf=global_conf)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line
> 296, in loadcontext
> global_conf=global_conf)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line
> 317, in _loadconfig
> loader = ConfigLoader(path)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line
> 393, in __init__
> with open(filename) as f:
> IOError: [Errno 13] Permission denied: '/etc/swift/account-server.conf'
>
> root at swift21:/home/swift# ls -l /etc/swift/*conf
> -rw-r--r-- 1 swift swift 422 Aug 14 15:16 /etc/swift/account-server.conf
> -rw-r--r-- 1 swift swift 458 Aug 14 15:14 /etc/swift/container-server.conf
> -rw-r--r-- 1 swift swift 454 Jul 18 10:40 /etc/swift/dispersion.conf
> -rw-r--r-- 1 swift swift 541 Aug 14 15:17 /etc/swift/object-server.conf
> -rw-rw---- 1 swift swift 1975 Aug 12 06:53 /etc/swift/proxy-server.conf
> -rw-rw---- 1 swift swift 51 Jun 28 11:36 /etc/swift/swift.conf
> root at swift21:/home/swift# cat /etc/swift/account-server.conf
> [DEFAULT]
> devices = /srv/accounts
> #devices = /srv/node
> bind_ip = 192.168.10.208
> bind_port = 6002
> mount_check = false
> user = swift
> log_facility = LOG_LOCAL0
> workers = 1
> log_level = WARNING
> eventlet_debug = true
> log_name = swift-account-server
>
> [pipeline:main]
> pipeline = account-server
>
> [app:account-server]
> use = egg:swift#account
>
> [account-replicator]
> concurrency = 8
>
> [account-auditor]
>
> [account-reaper]
> concurrency = 8
> root at swift21:/home/swift# ls -l /var/log|grep swift
> drwxr-xr-x 2 root root 4096 Aug 14 18:19 swift
> root at swift21:/home/swift# ls -l /var/log/swift/
> total 2788
> -rw-r--r-- 1 root root 0 Aug 14 18:14 a
> -rw-r--r-- 1 root root 0 Aug 14 18:14 aa
> -rw-r----- 1 syslog adm 113426 Aug 14 18:56 account.error
> -rw-r----- 1 syslog adm 0 Aug 14 18:19 account.log
> -rw-r----- 1 syslog adm 2027935 Aug 14 18:56 container.error
> -rw-r----- 1 syslog adm 0 Aug 14 18:19 container.log
> -rw-r----- 1 syslog adm 9888 Aug 14 18:56 object.error
> -rw-r----- 1 syslog adm 0 Aug 14 18:19 object.log
> -rw-r----- 1 syslog adm 0 Aug 14 18:19 proxy.error
> -rw-r----- 1 syslog adm 0 Aug 14 18:19 proxy.log
> -rw-r----- 1 syslog adm 196436 Aug 14 18:56 rsync.error
> -rw-r----- 1 syslog adm 483715 Aug 14 18:56 rsync.log
> root at swift21:/home/swift#
>
>
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130814/fd24d3dc/attachment.html>
More information about the Openstack
mailing list