允许保存文件但不允许查看?
有没有一种方法可以在目录中设置权限,使得:
- 每个用户都可以在目录中保存文件
- 只有目录所有者和文件所有者可以看到它
这个想法是允许人们在公共目录中保存机密数据。所有用户都应访问同一目录并将文件保存到其中,但不应允许他们查看彼此的文件。该目录是在 Linux 服务器中创建的,但可以通过 Samba 在 Windows 中访问。用户只了解基础知识,因此要求他们为每个文件设置权限是毫无疑问的。
Is there a way to set permissions in a directory such that:
- Every user can save files in the directory
- Only the directory owner and the file owner can see it
The idea is to allow people to save classified data in a public directory. All users should access the same directory and save files to it, but they shouldn't be alowed to see each other's files. The directory is created in a Linux server, but is accessed in Windows, via Samba. The users only know the basics, so asking them to set permissions on a per-file basis is out of question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,unix 权限只允许你设置读、写和执行位。如果要限制目录的 ls 权限,则必须将它们设置为整个目录。我会重新考虑您的设置方式(可能每个用户一个目录,其中一个超级用户对所有这些分类文档目录具有完全的读取权限)。
As far as I know, unix permissions only allow you to set read, write, and execute bits. If you want to restrict ls permissions for the directory, you have to set them to the directory as a whole. I would rethink the way you're setting this up (possibly one directory per user, with a superuser that has full read privileges for all of these classified document directories).