Hello! Im trying to create a screen folder for the user apache, Not root. But it seems to fail, I have no idea on how to fix this issue. I only get the error: Cannot make directory ‘/var/run/screen/S-apache’: Permission denied
你好! 我试图为用户的apache,而不是root创建一个屏幕文件夹。 但它似乎失败了,我不知道如何解决此问题。 我仅收到错误 :无法使目录“ / var / run / screen / S-apache”:权限被拒绝
Im using Cent OS 7
我正在使用Cent OS 7
There may be various possible reasons.
可能有多种可能的原因。
2 common reasons:
2个常见原因:
screen
is not installed correctly.
screen
未正确安装。
You may try using another non-root user to verify whether screen
is installed and works correctly. It makes use of the setgid
permission and these file/dir permissions should usually be as follows.
您可以尝试使用另一个非root用户来验证screen
是否已安装并正常工作。 它利用setgid
权限,这些文件/目录权限通常应如下所示。
screen
binary’s group should be ‘screen’ and screen
should have the ‘-s-‘ flag:
screen
二进制的组应为“屏幕”, screen
应具有“ -s-”标志:
$ getfacl $(which screen)
getfacl: Removing leading '/' from absolute path names
# file: usr/bin/screen
# owner: root
# group: screen
# flags: -s-
user::rwx
group::r-x
other::r-x
/var/run/screen
dir group is ‘screen’:
/var/run/screen
dir组为“ screen”:
$ ls -lha /var/run/ | grep screen
drwxrwxr-x 3 root screen 60 Aug 28 18:59 screen
If there are not like this, you may manually set them or re-install screen
.
如果不是这样,您可以手动设置它们或重新安装screen
。
SELinux blocks screen
.
SELinux阻止screen
。
Check the log after you tried screen
by user ‘apache’:
尝试由用户“ apache”进行screen
检查后查看日志:
# tail /var/log/audit/audit.log
and see whether it shows some messages related. If so, relax SELinux for the permissions.
并查看它是否显示一些相关消息。 如果是这样,请放宽SELinux的权限。
翻译自: https://www.systutorials.com/cannot-make-directory-var-run-screen-s-apache-permission-denied/