报错命令
# mount ......
报错代码
mount error(13) permission denied
解决思路
通过 dmesg 命令查看 kernel log 从确定问题出在哪里
# dmesg
......
# mount ......
mount error(13) permission denied
通过 dmesg 命令查看 kernel log 从确定问题出在哪里
# dmesg
......
# cat /var/log/audit/audit.log | grep test.txt
......
type=PATH msg=audit(1532475291.426:18858423)......
......
(
补充:
1) 这里以查看在 audit 日志中文件 test.txt 被修改的记录为例
2) 从这里的输出结果可以看到此次的修改记录中日志的编号是 18858423
)
# cat /var/log/audit/audit.log | grep ppid | grep 18858423
......
...... ppid=6027281 ......
......
(
补充:
1) 这里以查看在 audit 日志中和日志编号 18858423 相同的的日志里记录的 PPID 为例
2) 这里的日志编号 18858423 是在步骤一中查到的
3) 从这里的输出结果可以看到和此日志编号相同的日志里记录的 PPID 是 6027281
)
# cat /var/log/messages | grep terminal=ssh | grep 6027281
(
补充:
1) 这里以查看在系统日志中哪个用户登录系统时生成的是 PPID 6027281 为例
2) 这里的 PPID 6027281 是在步骤二中查到的
)
# setfacl ......
setfacl: ......: Operation not supported
添加 acl 参数
# mount -o remount,acl /mnt
(补充:这里以给挂载的 /mnt 目录添加 acl 参数为例)
# vi /etc/fstab
将部分内容修改如下:
......
/dev/sda5 /mnt xfs defaults,acl 0 0
......
(补充:这里以给从硬盘 /dev/sda5 挂载到 /mnt 目录的目录添加 acl 参数为例)
# vi /etc/security/limites.conf
Add these lines:
......
rmt - nofile 1024
rmt - nproc 1024
(Add: Setting the rmt user can open 8192 files and 8192 processes in this Linux as an example here)
# /bin/systemctl show 'rmt-server-mirror.service' | sort
......
LimitNOFILE=524288
......
(Add: The amount of opening the file by program rmt-server-mirror.service is limited at 8096 as an example here)
# scp ......
> scp test.txt 192.168.0.1:
scp: dest open "./test.txt": Failure
scp: failed to upload file test.txt to .
(补充:这里以将 test.txt 文件传到 IP 地址 192.168.0.1 同名用户的家目录然后报错为例)
可能是目标目录的空间不够了
在目标目录上释放一些空间