Ask Your Question
0

Permission denied in swift

asked 2013-07-17 09:31:53 -0500

chaowsh gravatar image

I just create account in swift-1.9.1 and return 503 errors, the log in syslog are below:

account-server ERROR __call__ error with PUT /sdh1/585/account : #012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/swift-1.9.1-py2.7.egg/swift/account/server.py", line 331, in __call__#012 res = method(req)#012 File "/usr/local/lib/python2.7/dist-packages/swift-1.9.1-py2.7.egg/swift/common/utils.py", line 1855, in wrapped#012 return func(a, *kw)#012 File "/usr/local/lib/python2.7/dist-packages/swift-1.9.1-py2.7.egg/swift/common/utils.py", line 680, in _timing_stats#012 resp = func(ctrl, args, *kwargs)#012 File "/usr/local/lib/python2.7/dist-packages/swift-1.9.1-py2.7.egg/swift/account/server.py", line 152, in PUT#012 broker.initialize(timestamp)#012 File "/usr/local/lib/python2.7/dist-packages/swift-1.9.1-py2.7.egg/swift/common/db.py", line 199, in initialize#012 mkdirs(self.db_dir)#012 File "/usr/local/lib/python2.7/dist-packages/swift-1.9.1-py2.7.egg/swift/common/utils.py", line 443, in mkdirs#012 os.makedirs(path)#012 File "/usr/lib/python2.7/os.py", line 150, in makedirs#012 makedirs(head, mode)#012 File "/usr/lib/python2.7/os.py", line 150, in makedirs#012 makedirs(head, mode)#012 File "/usr/lib/python2.7/os.py", line 150, in makedirs#012 makedirs(head, mode)#012 File "/usr/lib/python2.7/os.py", line 157, in makedirs#012 mkdir(name, mode)#012OSError: [Errno 13] Permission denied: '/srv/node/sdh1/accounts' (txn: tx21c43fc34e2d460b8da80-0051e6d213)

My environment is one proxy node and three storage nodes, I knew it is a Permission problem, but i don't know where the errors happened ,because i review the permissions setup docs for muli-nodes http://swift.openstack.org/howto_installmultinode.html#configure-the-storage-nodes (http://swift.openstack.org/howto_inst...) carefully, it really a strange error, could anyone help me ? thanks in advance!!!!

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2013-07-17 17:25:23 -0500

clay-gerrard gravatar image

so the basically effective user for the account-server process was unable to

mkdir -p /srv/node/sdh1/accounts

You could double check the 'user' setting in the account-server.conf and the permissions on those that mounted drive at /srv/node/sdh1

edit flag offensive delete link more
0

answered 2013-07-19 02:00:55 -0500

chaowsh gravatar image

Thanks clayg, that solved my question.

edit flag offensive delete link more
0

answered 2013-07-18 18:00:23 -0500

clay-gerrard gravatar image

I don't understand "swift can only make objects directory"

if you 'sudo -u swift mkdir -p /srv/node/sdh1/accounts' you get a permission error, but 'sudo -u swift touch /srv/node/sdh1/objects' works?

Sounds like the permission is ok on the existing directory, but not the mount point...

You might need to check your gid,uid,umask settings in fstab

or maybe a quick sudo chown swift:swift /srv/node/sd?1 (be careful with a -R, there might be a lot of objects in there...)

edit flag offensive delete link more
0

answered 2013-07-18 02:03:56 -0500

chaowsh gravatar image

thanks clay, actually in /srv/node/sd*1 swift can only make objects diretcory! So strange! Beside I am sure I set the right permissions on drives and account-server.conf.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-07-17 09:31:53 -0500

Seen: 885 times

Last updated: Jul 19 '13