如何在报告“无法使目录'/ var / run / screen':权限被拒绝”的Linux主机上运行screen?...

I want to run screen on a remote host on which I do not have root/sudo privilege and screen is not installed.

我想运行screen上,我没有根/ sudo的特权和远程主机上的screen尚未安装。

I can compile or copy the screen program that can run on the host. However, it reports:

我可以编译或复制可以在主机上运行的screen程序。 但是,它报告:

“Cannot make directory ‘/var/run/screen’: Permission denied”

“无法使目录'/ var / run / screen':权限被拒绝”

As screen is not installed on the host, the directory var/run/screen/ does not exist.

由于主机上未安装screen,因此目录var/run/screen/不存在。

How to run screen on a Linux host without requiring root privilege?

如何在不需要root特权的情况下在Linux主机上运行屏幕?

The directory /var/run/screen/ is the socket directory for screen.

该目录/var/run/screen/插座的目录screen

Fortunately, screen reads a environment variable SCREENDIR to get an alternative socket directory.

幸运的是, screen读取了环境变量SCREENDIR以获取备用套接字目录。

So to work around it, you can create a directory, such as ~/.screen:

因此,要解决此问题,您可以创建一个目录,例如~/.screen

mkdir ~/.screen && chmod 700 ~/.screen

and export the SCREENDIR to point to that directory:

并导出SCREENDIR指向该目录:

export SCREENDIR=$HOME/.screen

You can also put this line into you ~/.bashrc so that it will also take effect afterwards.

您也可以将此行放入~/.bashrc ,以使其随后生效。

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-run-screen-on-a-linux-host-reporting-cannot-make-directory-var-run-screen-permission-denied/

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值