root@node1 glance]# su -s /bin/sh -c "glance-manage db_sync" glance
Traceback (most recent call last):
File "/usr/bin/glance-manage", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.6/site-packages/glance/cmd/manage.py", line 253, in main
log.setup('glance')
File "/usr/lib/python2.6/site-packages/glance/openstack/common/log.py", line 440, in setup
_setup_logging_from_conf(product_name, version)
File "/usr/lib/python2.6/site-packages/glance/openstack/common/log.py", line 504, in _setup_logging_from_conf
filelog = logging.handlers.WatchedFileHandler(logpath)
File "/usr/lib64/python2.6/logging/handlers.py", line 377, in __init__
logging.FileHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib64/python2.6/logging/__init__.py", line 827, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib64/python2.6/logging/__init__.py", line 846, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/glance/api.log'
[root@node1 glance]# chmod 777 /var/log/glance/api.log
[root@node1 glance]# su -s /bin/sh -c "glance-manage db_sync" glance
[root@node1 glance]# echo $?
fix [Errno 13] Permission denied: '/var/log/glance/api.log'
原创
©著作权归作者所有:来自51CTO博客作者gray13的原创作品,请联系作者获取转载授权,否则将追究法律责任
![](https://ucenter.51cto.com/images/noavatar_middle.gif)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
【LeetCode】39. 组合总和
【LeetCode】39. 组合总和
leetcode 数据结构与算法 C++