如果您不需要或不想加密计算机上的文件,但希望停止随意窥探,那么在Linux/Unix上用密码保护文件夹的最佳方法是什么?今天的超级用户问答帖子对一位好奇的读者的问题提供了有用的答案。
今天的问题;回答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的Q&;分组;一个网站。
照片由Nathan Meijer(Flickr)提供。
超级用户读者Zane Woodard想知道如何在Linux/Unix上不加密地对文件夹进行密码保护:
I have searched around quite a bit for either a built-in feature or program to do this, but had no luck. I want to password protect a folder, but do not want to encrypt it.
The security of the contents of the folder is not important, the password would just act as a deterrent to somebody attempting to access the contents of the folder from my computer. Think of it like a password lock on a computer, if you were to remove the hard-drive, you could easily take all the files the user had, but the password is still a deterrent to people accessing the contents of the drive.
Two main reas*** for not using encryption here are:
Is anybody aware of a solution?
有没有一个简单的解决方案,赞恩可以用来密码保护他的文件夹?
超级用户贡献者R舒尔茨和Bodo Thiesen为我们提供了答案。首先,R舒尔茨:
The easiest way would be to change the permissi*** of the files so that they are not readable by anyone other than the owner. Once that is done, a user would have to either log in as you (which should require a password) or sudo as root (which should also require a password). To change the permissi***, simply use the following command on any files you do not want others to have access to.
This assumes that when you are not at your computer, your screen is locked and there is a password for your account as well as the root account.
接着是博多·蒂森的回答:
Create a new user for these protected files and/or directories. Then replace $newuser with the new user account name:
This way, the files and directories are safe even if you do not log out and have your screen unlocked for some reason.
有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。
... 我们讨论过保护macOS上的文件和文件夹以及保护Windows上的文件夹。您还可以通过加密文件和文件夹来保护Linux上的信息。 ...
... 如果您在尝试访问文件或文件夹时在Windows 10上看到“拒绝访问”消息,我们将指导您完成解决此问题的步骤。 ...
想学习如何保护闪存驱动器吗?不幸的是,你不能用密码保护整个U盘。但是您可以加密分区、文件夹和存档。 ...
... 在Mac上加密文件和文件夹时,MacOS允许您直接压缩和密码保护数据,而无需第三方软件。 ...
... 如何使用个人保险库 要使用Personal Vault,只需打开OneDrive文件夹,然后单击或轻触“Personal Vault”文件夹。你可以在windows10pc上通过网站或使用你喜欢的智能**应用程序来实现这一点。 例如,在Windows10上,只需打开文件资源管理...
...打开时,Excel将提示您输入密码。 如果要从文件中删除密码保护,请打开它(当然,这需要您提供当前密码),然后按照指定密码的相同步骤进行操作。只有这一次,使密码字段为空,然后单击“确定” 将工作簿设为只读 使...
...cOS,安装更简单,只需双击安装程序并将其拖到Applicati***文件夹。 安装完成后,您的默认web浏览器将打开到端口8080上的本地主机的连接,在那里您将收到SABnzbd快速启动向导的欢迎。选择您的语言,然后单击“开始向导”按钮...
...启用BitLocker。 如何使用bitlocker加密驱动器 相关:如何在没有可信平台模块(TPM)的情况下使用BitLocker 要将BitLocker用于驱动器,您真正需要做的就是启用它,选择解锁方法密码、PIN等,然后设置其他一些选项。不过,在我们开始...
...置和更改系统上的密码。如果Grub引导菜单被锁定并且受密码保护,您仍然可以引导到Linux live媒体并从那里更改您的密码。 同样,加密将防止在没有加密密码短语的情况下访问和修改系统。我们以Ubuntu为例,但是几乎每个Linux发...