Solved

samba files are hidden

Posted on 2004-08-17
7
856 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
7 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Perhaps you might wish to try SWAT or Webmin to try configuring your shares?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 3

Author Comment

by:krazieintent
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

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,…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now