• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 963
  • Last Modified:

samba files are hidden

hey everone

First off, im new to linux

i have a samba file server which is providing files to all window machines.

and after setting up the smb.conf

all of the shares are accessable but all of the files are hidden for all users

and the only way to see them is to show hidden files in windows

how do i stop this from happening in the future

and also convert all of the current files on the server not to be hidden again

thank you

1 Solution
Unless you've specifically listed files files to be hidden in your smb.conf share definition via one of the "hide" directives in the share definition what files will be hidden are determined via the normal rules on a windows client. The smb.conf directives that can cause files to be hidden over and above what the clinet would normally hide include:

hide dot files (S)
              This is a boolean parameter that controls whether files starting
              with a dot appear as hidden files.
              Default: hide dot files = yes
hide files (S)
              This is a list of files or directories that are not visible  but
              are  accessible.  The  DOS  ’hidden’ attribute is applied to any
              files or directories that match.
              Each entry in the list must be separated by a ’/’, which  allows
              spaces  to  be included in the entry. ’*’ and ’?’ can be used to
              specify multiple files or directories as in DOS wildcards.
              Each entry must be a Unix path, not a  DOS  path  and  must  not
              include the Unix directory separator ’/’.
              Note  that  the  case sensitivity option is applicable in hiding
              Setting this parameter will affect the performance of Samba,  as
              it will be forced to check all files and directories for a match
              as they are scanned.
              Default: hide files = # no file are hidden
hide special files (S)
              This parameter prevents clients from seeing special  files  such
              as sockets, devices and fifo’s in directory listings.
              Default: hide special files = no
hide unreadable (S)
              This  parameter  prevents  clients  from seeing the existance of
              files that cannot be read. Defaults to off.
              Default: hide unreadable = no
hide unwriteable files (S)
              This parameter prevents clients from  seeing  the  existance  of
              files  that  cannot  be  written  to. Defaults to off. Note that
              unwriteable directories are shown as usual.
              Default: hide unwriteable files = no
Other than "hide dot files" the default is off, so any files not visble on the client are hidden by the windows client rules, not the server.

Could you show us an example of what's being hidden and what the results of 'grep hide smb.conf' are?
Try this as a samba share profile (from smb.conf) - Designed to ensure that all files are visible:

        path = /home/general
        comment = General Folder
        writable = yes
        force directory mode = 766
        force create mode =766
        create mode = 766
        directory mode = 766
        delete readonly = yes
        guest account = general
        wide links = no
        public = yes
        guest only = yes

As for invisible files - if the files begin with a '.' period, then they are treated as hidden files, so the default .basrc, and other files from skel to a home directory are also invisible, unless you set  Tools->Folder Options in windows to view the endingd after the '.'

The = 766 lines are the ones that force visibility and accessibility, but not that they may be far too general for your requirements and you may need to limit that a bit. This share is effectivily accessible by everyone, but it gives you a good place to start.

Perhaps you might wish to try SWAT or Webmin to try configuring your shares?
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

krazieintentAuthor Commented:
well i was just messing with the server and under each directory i added map hidden= no

and that seemed to clear everything up

but thanks for the help

- Kevin

I think the points should be awarded to jlevie for is work and effort. Although the solution wasn't exactly what jlevie mentioned, he pointed in the right direction and helped in some way to the solution.


You shouldn't need to add map hidden = no, unless there is something in the 'generic' part of the smb.conf file that makes it hidden in the first place. (But I agree that jlevie provided the most useful pointer)
krazieintentAuthor Commented:
thank you all for your insight on this and due to popular demand jlevie gets the points

but again thank you all :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now