Solved

samba files are hidden

Posted on 2004-08-17
7
894 Views
Last Modified: 2012-06-21
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

kevin
0
Comment
Question by:krazieintent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 11822457
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
              files.
                                                                               
              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?
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 11822464
Try this as a samba share profile (from smb.conf) - Designed to ensure that all files are visible:

[general]
        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.

HTH:)
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 11822522
Perhaps you might wish to try SWAT or Webmin to try configuring your shares?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 3

Author Comment

by:krazieintent
ID: 11822549
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
0
 
LVL 1

Expert Comment

by:bestondoa
ID: 11843456
Hello,

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.

Cheers,

Bestondoa
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 11844163
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)
0
 
LVL 3

Author Comment

by:krazieintent
ID: 11845696
thank you all for your insight on this and due to popular demand jlevie gets the points

but again thank you all :)
0

Featured Post

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question