Ubuntu下启动 Redis时, 提示 "Can't open the log file: Permission denied failed"
2017-06-02 11:10
841 查看
问题来源:在删除var目录下的log文件时,将redis文件夹删除了。然后在重启时:/etc/init.d/redis-server start,提示:
Starting redis-server:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 94
>>> 'logfile /var/log/redis/redis-server.log'
Can't open the log file: No such file or directory
failed。好吧,于是 touch /var/log/redis/redis-server.log后,再重启时,提示:
Starting redis-server:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 94
>>> 'logfile /var/log/redis/redis-server.log'
Can't open the log file: Permission denied
failed
查了一下,最终发现有可能是权限不够的问题,于是,ls -l /var/log/redis/redis-server.log
提示:-rw-r--r-- 1 root root 0 6月 2 10:05 /var/log/redis/redis-server.log。如下图所示:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/09/e5cdd9698f2df182e37afb0a58f5aff7)
解决办法:
chmod 777 /var/log/redis/redis-server.log
再重启,显示成功。问题得到解决
Starting redis-server:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 94
>>> 'logfile /var/log/redis/redis-server.log'
Can't open the log file: No such file or directory
failed。好吧,于是 touch /var/log/redis/redis-server.log后,再重启时,提示:
Starting redis-server:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 94
>>> 'logfile /var/log/redis/redis-server.log'
Can't open the log file: Permission denied
failed
查了一下,最终发现有可能是权限不够的问题,于是,ls -l /var/log/redis/redis-server.log
提示:-rw-r--r-- 1 root root 0 6月 2 10:05 /var/log/redis/redis-server.log。如下图所示:
解决办法:
chmod 777 /var/log/redis/redis-server.log
再重启,显示成功。问题得到解决
相关文章推荐
- PHP "Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0" 错误
- redis aof持久化遇到的Can't open the append-only file Permission denied
- Apache启动错误Permission denied: httpd: could not open error log file解决方法
- PHP Warning: file_put_contents(".."):failed to open stream: Permission denied in...
- 升级 YUSEMITE后,MAMP PRO Apache 不能启动?提示:Apache couldn't be started. Please check the log file for more
- 升级 YUSEMITE后,MAMP PRO Apache 不能启动?提示:Apache couldn't be started. Please check the log file for more
- Myeclipse中消除frameset引起的“the file XXX can not be found."的提示
- 当尝试从ArcCatalog、.net应用或是Java应用中连接ArcGIS Server 时,显示下面任何一种错误提示: "Access Denied" 或 "The connection could not be made"
- Unity3d 提示 "The scripts file name does not match the name of the class defined in the script!"的解决办法
- Eclipse提示"An error has occurred.See the log file xxx.log"的解决方法。
- ubuntu 下eclipse 启动时出现An error has occurred. See the log file的问题
- samba 提示Failed to initialize the registry: WERR_CAN_NOT_COMPLETE 无法启动
- eclipse C++ "cannot open out put file test.ext, permission denied"
- eclipse启动时提示"Failed to load the jni shared library"
- VM 启动报错 "Failed to lock the file"
- redis aof持久化 遇到的Can't open the append-only file: Permission denied
- VMware 启动报错 "Failed to lock the file"解决办法
- MyEclipse中消除frame引起的“the file XXX can not be found."的提示
- 【已解决】Ubuntu 12.04 LTS Source安装nodejs时出现"bash ./configure permission denied"
- MyEclipse中化除frame引起的“the file XXX can not be found."的提示