Solved

samba files are hidden

Posted on 2004-08-17
7
876 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
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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to have a cron job run until a condition is met 12 64
Steps to follow for Maintenance of Servers 4 62
AWS ELB 5 76
AWS Central Authentication 1 53
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

786 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