samba - users can see system files etc when accesing share
I have sucessfully set up samba networking/samba user/ and a single samba share on my suse 9.0 box.
Users are able to access the samba share from windows boxes (using no password/blank password) using the samba username. Problem is that when they connect, in addition to seeing the files stored in the samba share, user can also see a number of other directories and files that look like system items. I copied the dir listing here as it appears on the windows box after connecting to the share: ~~~~~~~~~~~~~~~ ftpshar on 10.2.1.241 ~~~~~~~~~~~~~~~ .gnup (folder icon) .kde (folder icon) .ncop (folder icon) .qt (folder icon) .skel (folder icon) Desktop (folder icon) .fonts.cache-1 .ICEauthority .mcoprc .wmrc .xauthority .xsession-errors COPYING.tex SuSE-9.0-LiveEval-i386-Int-RC1.iso (valid shared file in share folder) Readme.txt (valid shared file in share folder) Help... im pretty new to linux networking... Thanks |
Could you copy and paste the "smb.conf" file to here. Also before you do, goto the directory that SAMBA is sharing and issue "ls -la" and make sure those files are not in that directory. If they are, just make a whole new directory called "Data" or something similar in your "/home" partition. After that, update your "smb.conf" file to reflect the new changes to made and then restart your SAMBA daemons.
|
oh boy... just remembered something.... this directory also acts as a home directory for vsftpd and its user.... Im sure that is related to the problem...
background: I am trying to create a directory on my linux box that: external users can copy file to/from via FTP, then internal users can retrieve the files/copy via a windows drive letter mapping ls -la revealed that the files are in fact in that directory... I didnt notice this earlier because they do not show up in any of the graphical file managers... am I going about this the wrong way? any alternatives? |
here is my smb.conf file
# Samba config file created using SWAT # from localhost (127.0.0.1) # Date: 2004/01/05 06:51:54 # Global parameters [global] netbios name = LS001 browseable = no printing = cups server string = socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY path = /srv/ftp os level = 2 comment = TPC Ftp Folder null passwords = yes encrypt passwords = yes printcap name = CUPS syslog = 0 veto files = /*.eml/*.nws/riched20.dll/*.{*}/ log level = 1 [printers] comment = All Printers path = /var/tmp create mask = 0600 printable = Yes browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @ntadmin root force group = ntadmin create mask = 0664 directory mask = 0775 [ftpshar] writeable = yes |
Do something like this:
[Data] comment = Data path = /home/Data browseable = yes writable = yes public = yes Then from there, your probably going to have to configure some .conf file for your FTP server to allow the users logging in to access that directory. |
Let me know the outcome of your situation, I'm kind of curious.
|
Im using vsftpd.... for security sake, it seems to require that you create a nonpriviledged user (cannot run as root) to handle ftp logins, and that user's home directory becomes the ftp repository. Im guessing that KDE stores items like a users desktop and gui settings (or are they aliases of some kind) as hidden files/dirs in the users home directory (can someone verify this?). Cosequently, when users access that dir thru samba, they can see the HIDDEN ITEMS in addition to the valid files uploaded via ftp.
I thought of creating a separate directory for smb, then creating a cronjob that copies any new files to the (other) directory (either direction)... but that would be a jimmy rig... Perhaps I could remove all view rights to the system items for the samba user? Is this correct, and how would I do so? Alternatively, could I delete all those files since the ftp user account will never log into the KDE window mgr? Any other feasable solutions? Any help is much appreciated - T |
Solution - I backed up my entire system, then simply deleted all unecessary system files in the folder... since the ftp service user account will (in theory) never log into KDE... everything is working fine - problem solved.
|
you could always add this to you smb.conf
hide dot files = Yes always run: #testparm after changing config -will |
All times are GMT -5. The time now is 07:10 PM. |