Directories shown as files, when sharing a mounted cifs drive
- by Johan Sigfred Abildskov
I have an issue where a directory is shown as a file when accessing a samba share ( on Ubuntu 12.10 ) from a Windows machine.
The output from ls -ll in the folder on the linuxbox is as follows:
chubby@chubby:/media/blackhole/_Arkiv$ ls -ll
total 0
drwxrwxrwx 0 jv users 0 Jun 18 2012 _20
drwxrwxrwx 0 jv users 0 Apr 17 2012 _2006
drwxrwxrwx 0 jv users 0 Apr 17 2012 _2007
drwxrwxrwx 0 jv users 0 May 12 2011 _2008
drwxrwxrwx 0 jv users 0 Feb 19 09:53 _2009
drwxrwxrwx 0 jv users 0 Dec 20 2011 _2010
drwxrwxrwx 0 jv users 0 May 8 2012 _2011
drwxrwxrwx 0 jv users 0 Mar 5 11:37 _2012
drwxrwxrwx 0 jv users 0 Feb 28 10:09 _2013
drwxrwxrwx 0 jv users 0 Feb 28 11:18 _Mailarkiv
drwxrwxrwx 0 jv users 0 Jan 3 2011 _Praktikanter
The entry in /etc/fstab is:
# Mounting blackhole
//192.168.0.50/kunder/ /media/blackhole cifs uid=jv,gid=users,credentials=/home/chubby/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
When I access the share directly from the NAS on my Windows box, there are no issues.
The version of Samba is 3.6.6, but I couldn't find anything in the changelogs that seem relevant.
I've tried mounting it in different locations with different permissions, users and groups but I have not made any progress
Due to my low reputation on serverfault ( mostly stackoverflow user ) I'm unable to post a screenshot that shows that the directories are shown as files.
If I type the full path in explorer, the directory listing works excellently, except for any subdirectories that are then shown as files.
Any attack vector for this issue would be greatly appreciated.
Please let me know if I have provided insufficient details.
Edit:
The same share when accessed from a OS X, works perfectly listing the directories as directories.
Best Regards!