简体   繁体   English

Samba文件服务器隐藏某些用户的文件夹

[英]Samba File Server hide folders for certain users

I have a Ubuntu machine with the following folders. 我有一个带有以下文件夹的Ubuntu机器。

文件夹

I am using samba server to share the folder. 我正在使用samba服务器来共享该文件夹。

I have 3users: 我有3个用户:

user 1 = full access 用户1 =完全访问权限
user 2 = access to folder music (only read) 用户2 =访问文件夹音乐(仅读取)
user 3 = access to folder school (only read) 用户3 =访问文件夹学校(仅读取)

I want to be prompted to log in when you try to access the folder Shared. 我想在您尝试访问Shared文件夹时提示您登录。 If user 1 sings in he gets to view all the folders. 如果用户1唱歌,他将查看所有文件夹。 If user 2 signs in he only gets to see the folder music. 如果用户2登录,他只能看到文件夹音乐。 And if user 3 sings in he only can see the folder school. 如果用户3唱歌他只能看到文件夹学校。

So the idea is to hide folders for users that are not allowed to see those. 因此,我们的想法是为不允许查看这些内容的用户隐藏文件夹。 How can you configure this using samba server. 如何使用samba服务器配置它。

EDIT: If they can't read the content of the folders it's also okay, if hiding folders isn't possible or harder to do. 编辑:如果他们无法读取文件夹的内容它也没关系,如果隐藏文件夹不可能或更难做。

I already wrote a solution for your problem at askubuntu.com 我已经在askubuntu.com上为你的问题写了一个解决方案

https://askubuntu.com/a/531476/333893 https://askubuntu.com/a/531476/333893

Refer to this page for more information: https://www.samba.org/samba/docs/using_samba/ch09.html 有关更多信息,请参阅此页面: https//www.samba.org/samba/docs/using_samba/ch09.html

It helped me a lot. 这对我帮助很大。

也许这本官方手册可以帮助你https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM