Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Server 14.04 - Missing Folders with Samba

  1. #1
    Join Date
    Apr 2013
    Beans
    41
    Distro
    Ubuntu 15.04 Vivid Vervet

    Server 14.04 - Missing Folders with Samba

    I setup a samba share in Ubuntu Server 14.04 and in general it works well. However I have a folder with lots (1000s) of subfolders that does not always display every available folder. Here is what my testing has found.

    1. From Mint desktop, connect over smb. Result: Missing some folders (most of them in fact)
    2. From Mint desktop, mount the smb share. Navigate to the folder through the mount point. Result: All folders available
    3. From Windows 7 desktop, connect over smb. Result: Missing some folders. In fact the same ones as were missing from Mint, so it does not appear random.
    4. From Android using ES Explorer, connect over smb. Result: All folders available (this one surprised me).

    Any thoughts on what is going on here? I have triple checked over ssh that the folders are in fact there.

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Server 14.04 - Missing Folders with Samba

    Check the directory permissions. On my home server, not connected to the internet, they are 755.

  3. #3
    Join Date
    Apr 2013
    Beans
    41
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Server 14.04 - Missing Folders with Samba

    I double checked and the permissions for all the folders are 775. Inside some of the sub folders are sub-sub folders with identical permissions but that do not uniformly show up via smb.

    Again, all of the folders show up when I mount the cifs share and on my phone so I wouldn't think it is a permissions issue (admitting of course my knowledge on this is limited).

  4. #4
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Server 14.04 - Missing Folders with Samba

    Could you shows how you setup the shares in /etc/samba/smb.conf

  5. #5
    Join Date
    Apr 2013
    Beans
    41
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Server 14.04 - Missing Folders with Samba

    Some more investigation.

    First, here is the share in question from the smb.conf

    [samba]
    comment = Webserver File Share
    path = /srv/samba
    browsable = yes
    guest ok = no
    read only = no
    create mask = 0755
    I connected to the share using smbclient and I found this error when I list the directory in question

    smb: \music\> ls
    cli_list: Error: unable to parse name from info level 260
    The client then proceeds to list about 200 of the ~1000 of available folders

    Compare to using the mount point:
    inspiron ~/Music $ find -type d -maxdepth 1|wc -l
    1141



    And this looks like something that could be messing up SMB. It is not reproducing but the terminal is displaying a character that looks like a box with text inside. Image attached.
    @inspiron ~/Music $ ls -l|more
    ls: œ: No such file or directory
    ls: €: No such file or directory
    ls: ˆ: No such file or directory
    ls: : No such file or directory
    ls: „: No such file or directory
    ls: ´: No such file or directory
    total 0
    drwxrwxr-x 3 a a 0 May 5 16:31 ´
    drwxrwxr-x 3 a a 0 May 5 19:15 €
    drwxrwxr-x 4 a a 0 May 5 18:46 „
    drwxrwxr-x 3 a a 0 May 5 17:47 ˆ
    drwxrwxr-x 3 a a 0 May 5 19:24 œ
    Attached Images Attached Images

  6. #6
    Join Date
    Apr 2013
    Beans
    41
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Server 14.04 - Missing Folders with Samba

    Looking at an sdiff of a backup of the data on another machine and the current folder exhibiting smb issues, I noticed at least one missing folder. Right now I am blaming Björk and the need for an umlaut in her name.

  7. #7
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Server 14.04 - Missing Folders with Samba

    What filesystem is being used here? Ext4? NTFS? Something older like FAT32? If all your systems use Unicode, and the filesystem is using ext4 (or NTFS, I believe), there shouldn't be a problem with character encodings.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Apr 2013
    Beans
    41
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Server 14.04 - Missing Folders with Samba

    I am mounting the file system locally as cifs. The fs on the remote server is ext4
    /dev/mapper/webserver--vg-samba on /srv/samba type ext4 (rw)
    I tried remounting the volume with iocharset=utf8
    $ sudo mount -t cifs //webserver/samba/music ~/Music -o noexec,iocharset=utf8
    But I still have folders that can't display
    $ ls -l ~/Music/|wc -l
    ls: /home/Music/œ: No such file or directory
    ls: /home/Music/€: No such file or directory
    ls: /home/Music/ˆ: No such file or directory
    ls: /home/Music/ : No such file or directory
    ls: /home/Music/„: No such file or directory
    ls: /home/Music/´: No such file or directory
    1141

    Here are my locale settings
    $ locale
    LANG=en_US.UTF-8
    LANGUAGE=
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=

  9. #9
    Join Date
    Apr 2013
    Beans
    41
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Server 14.04 - Missing Folders with Samba

    I still think this is some encoding thing. Using ls -b helps with being able to grep the "offending" folders. Without -b I get a question mark.

    This is the output when I ssh into the fileserver (no comments about music tastes please)
    $ ls -lbR /srv/samba/music |grep "/srv/samba"|grep 366
    /srv/samba/music/Bj\366rk:
    /srv/samba/music/Bj\366rk/Army of Me - EP:
    /srv/samba/music/Dr\366mhus:
    /srv/samba/music/Dr\366mhus/Dr\366mmar:
    /srv/samba/music/M\366tley Cr\374e:
    /srv/samba/music/M\366tley Cr\374e/Dr. Feelgood:
    /srv/samba/music/M\366tley Cr\374e/Motley Crue - Greatest Hits:
    /srv/samba/music/R\366yksopp:
    /srv/samba/music/R\366yksopp/Melody A.M_:
    The folders above are all missing from the cifs mount on my local machine (laptop running Mint).

  10. #10
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Server 14.04 - Missing Folders with Samba

    If you're mounting an ext4 file system onto a Linux client, use NFS, not CIFS. NFS should show you the exact same file names on the client as on the server. CIFS only makes sense if you need to share files on a Linux server to Windows clients.

    https://help.ubuntu.com/14.04/server...le-system.html

    That said, it looks like the file names were scrambled in the process of writing them to the server. I share directories with Japanese file names using NFS that appear correctly on both the server and the client. For instance,
    Code:
    斉藤恒芳 - 03 - 暗黒の街からの脱出.ogg
    These were ripped from the CD using KDE's native "kio-slave" technology that creates virtual folders in the Dolphin file manager each representing the CD in the available formats like FLAC, Ogg, and MP4. Howver I'm pretty sure any Linux ripper would preserve the original file names.
    Last edited by SeijiSensei; June 8th, 2015 at 05:29 AM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •