登录用户在使用命令行模式启动redis时报错,提示权限不足:
[advant@localhost ~]$ /usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 171
>>> 'logfile /usr/local/redis/redis_log/redis_log.log'
Can't open the log file: Permission denied
使用root权限可以正常启动,因此可以断定是普通用户权限不足,修改一下即可。
[root@localhost redis_log]# chmod 777 /usr/local/redis/redis_log/redis_log.log
再次登录普通用户启动,就没有问题了。