chmod-保护用户文件被访问,以便只有所有者可以访问? [英] chmod - protect users' file being accessed so only owner can access?

查看:104
本文介绍了chmod-保护用户文件被访问,以便只有所有者可以访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置chmod,以便文件的唯一所有者可以读取,写入和执行? (其他用户无法读取,写入和执行)

How to set chmod, so that ONLY owner of the file can read, write and execute? (other users cannot read, write, and execute)

推荐答案

chmod 600 filename会做到; 或者 chmod 700如果它是可执行文件.

chmod 600 filename will do it; or chmod 700 if it is an executable.

不那么神秘的另一种方法是:

Another way that is less cryptic is:

chmod go-rwx filename

  • "g"用于组
  • "o"是给别人的
  • -"用于删除权限
  • "r"代表阅读权限
  • "w"代表写权限
  • "x"用于执行权限.

这篇关于chmod-保护用户文件被访问,以便只有所有者可以访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆