我有基于 o Windows Server 2008 R2 的文件服务器,其中有一些带有隐藏文件的共享。在其上创建共享的 FS 是 NTFS 现在我已经使用 CIFS 在 ubuntu 中安装了这些共享,一切正常,除了我可以看到所有隐藏文件,这是预期的,但不是我们想要的。有没有办法不在ubuntu中显示这些文件?
我发现该线程:http : //ubuntuforums.org/showthread.php?t=1882753&s=c2495b99639759e45b80953f131d3d97,这表示如果安装 ntfs 分区这是可能的。任何可能的方法来使用 cifs 完成这个?也许使用 ntfs 安装 netowk 共享;这行得通吗?
参见samba.org/samba/docs/man/manpages-3/smb.conf.5.html
有多个标志/选项有助于通过 Samba 共享隐藏选定的文件:
# hide files start with a dot (.)
hide dot files = yes
# hide selected files. example files start with ($)
hide files = /$*/
# hide pipes, sockets, devices ...
hide special files = yes
# hide files with no read permissions
hide unreadable = yes
# hide files with no write permissions
hide unwriteable files = yes
Run Code Online (Sandbox Code Playgroud)
在大多数发行版中,配置可以在 /etc/samba/smb.conf 中找到
作为新用户在终端中运行它(建议:进行备份):
sudo gedit /etc/samba/smb.conf
Run Code Online (Sandbox Code Playgroud)
然后重启samba服务
sudo service samba restart
Run Code Online (Sandbox Code Playgroud)
如果您想要全局共享选项,请在带有 ([]) 的部分之前插入这些行。否则,使用共享路径的特定选项,将行放在所需部分下或创建新的。例子:
[foo]
path = /home/bar
read only = yes
hide dot files = yes
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24279 次 |
| 最近记录: |