cannot create temp file for here-document: Permission denied /tmp 权限1777,但是无法创建文件 Permission denied

Shell Liemer_Lius 868℃
> ls   // 点击Tab补全
-bash: cannot create temp file for here-document: Permission denied
-bash: cannot create temp file for here-document: Permission denied

如上,今天遇到一个问题,/tmp用stat命令查看权限正确:

> stat /tmp
  File: '/tmp'
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: fe0dh/65037d	Inode: 2           Links: 35
Access: (1777/drwxrwxrwt)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-05-15 20:52:37.049884203 +0800
Modify: 2020-05-15 21:00:01.961364130 +0800
Change: 2020-05-15 21:00:01.961364130 +0800
 Birth: -

但是,但是无法写入文件,提示Permission denied。

重启了服务器,问题仍在。

/etc/fstab无/tmp目录的noexec选项;
fuser -km /tmp && mount /path/of/lv_tmp /tmp   // 执行失败
cd / && umout -l /tmp && mount /path/of/lv_tmp /tmp

如此,问题解决了。。。

 

转载请注明:skelchina.com » cannot create temp file for here-document: Permission denied /tmp 权限1777,但是无法创建文件 Permission denied

喜欢 (0)