关于000文件权限的查看问题

本文深入探讨了Linux系统中文件权限设置为000时的访问特性,详细讲解了root用户与普通用户对文件的不同访问权限,以及这些权限如何影响文件的可读、可写和可执行性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

故事背景
root@bionic:~# ls -l a1
---------- 1 root root 3 Jul 22 06:58 a1
root@bionic:~# cat a1
A1
原因解释

1.As root, change the permissions of a file to 000. This file and its contents can only be accessed by root.
2.As a user, change the permissions of your own file. The file and its contents cannot be accessed by the user. But the root has full privileges on the file.

参考链接

https://stackoverflow.com/questions/5593752/who-can-access-a-file-with-octal-permissions-000-on-linux-unix

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值