Subscribe

Hide files that start with a dot only on one share.

Hello folks,

we have a volume which we need to export via NFS and CIFS.

This volume serves mainly as a file repository for some designers which work on macs and therefore access the volume via NFS.

On the other hand, they also want to access their data from any windows workstation in our company.

Now, our problem is that we would like to hide all the unix system files that start with a dot (.), on our windows clients.

I know that there is an option exactly for that purpose called "cifs.show_dotfiles". Unfortunately, I can't set this option on the volume level and i don't want to hide the dotfiles on all my cifs exports.

Can anybody tell me whether I can hide these files from the windows clients without using the option mentioned above and if yes, how?

Greets

Pascal

Re: Hide files that start with a dot only on one share.

Hi Pascal,

I don't think there's any option you can control on a per share basis for display of the snapshots. Just FYI... there's one option given below for controlling the snapshot display for the NFS side access.

-Reena

nfs.hide_snapshot
This is off by default and is persistent across reboots. This is effective only when nosnapdir is disabled. Setting this option to on allows snapshots to be hidden in the NFS directory listings. The .snapshot directory itself is visible, but the actual snapshots will be hidden. At the same time, an explicit access to snapshots is allowed even though they are not visible in the directory listings.

Also, when this option is set to on, a hidden ".snapshot" directory is available within the ".snapshot" directory. This new entry is not visible in the directory listings of parent ".snapshot" but when accessed, will give the list of named snapshots that were hidden in the parent ".snapshot" directory. Basically, This provides a convenient way to see the list of snapshots available in the parent ".snapshot" directory, even when this option is set to on.

NOTE: When this option is on and if you have mounted a path ending with ".snapshot", `pwd' may not work correctly in such a mounted path and its directory tree on the client. As a result, any applications that depend on obtaining the current working directory using the standard UNIX library calls like getpwd(3C) may not function correctly. The exact result reported when asked for current working directory is dependent on the client's `pwd' implementation.

Re: Hide files that start with a dot only on one share.

Hello Reena,

thanks for your answer.

My problem isn't especially about whether the user sees the .snapshots directory but about files that start with a dot in general.

Greets

Pascal

Re: Hide files that start with a dot only on one share.

One possible solution to this problem would be to end those dot files name with $,what this does in windows is ,it hides the file and if i need to access this paritcular file in windows i need to mention the file name to access it else all the shares named with $ at end will be hidden.You can try to rename the dot file with a $ at the end and see if this helps.For ex: let us say the file name is .test rename it to .test$ and try to access in windows client,this will the hide this file.To access this file in windows i will have to specify then name of it,like \\filer-name\test$. You can try this and see if this helps.

Regards,

Vinay

Re: Hide files that start with a dot only on one share.

Hello Vinay,

thanks for your hint. Unfortunately, I can not simply rename the files because they are os x system files.

Also, these files are created automatically what makes renaming impossible.

Regards,

Pascal

Re: Hide files that start with a dot only on one share.

That should generally be controlled on the host side for the view of

the folders, e.g., windows explorer can control thru the folder options.

Reena Gupta

Re: Hide files that start with a dot only on one share.

Hello reena,

thanks for your answer. Unfortunately, I have no idea which option can do this.

For me, there are two possible options:

- "Hide protected operating system files"

- "Do not show hidden files and folders"

But even if I set both, I can still see e.g. the .avail file in my filers "etc" directory.

Any ideas?

Regards,

Pascal

Re: Hide files that start with a dot only on one share.

Hi Pascal,

Those were just the couple of things that I was aware of, not sure what are the other different possible ways to achieve this on the client side.

Thanks,

Reena