renaming in Samba

I’ve had this strange on going issue with my setup either a Samba setting or maybe a drive format issue and using Linux or maybe an FSTAB setting incorrect. If I have a folder called opensuse and I want to rename it to OPENSUSE it will let me rename it but it will not stick as OPENSUSE it will just stay opensuse.

thanks for any help :slight_smile:

sullysnet wrote:
> I’ve had this strange on going issue with my setup either a Samba
> setting or maybe a drive format issue and using Linux or maybe an FSTAB
> setting incorrect. If I have a folder called opensuse and I want to
> rename it to OPENSUSE it will let me rename it but it will not stick as
> OPENSUSE it will just stay opensuse.

What is the file system type? If that Samba share is mounted on a Windows
machine, then it will be case independent.

On Sat December 27 2008 09:39 pm, Larry Finger wrote:

> sullysnet wrote:
>> I’ve had this strange on going issue with my setup either a Samba
>> setting or maybe a drive format issue and using Linux or maybe an FSTAB
>> setting incorrect. If I have a folder called opensuse and I want to
>> rename it to OPENSUSE it will let me rename it but it will not stick as
>> OPENSUSE it will just stay opensuse.
>
> What is the file system type? If that Samba share is mounted on a Windows
> machine, then it will be case independent.
sullynet;
Read the section titled “Name Mangling” in “man smb.conf” for additional
information.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

And in addition, the name that gets projected around a network is the bit in square brackets in smb.conf. So if a server makes a share like this in smb.conf:

[TESTshare]
path = /home/gertrude/MusicDisks
read only = no
guest ok = yes

The directory that you share might be /home/gertrude/MusicDisks and you can change it all you like but you’ll see it on the address smb:// as TESTshare
And you’ll have to use the case TESTshare in fstab to cifs mount it on a client.

Not sure if that’s what you were talking about.

well all 3 HDD are formatted FAT32 and setup in FSTAB as Vfat. Here is what I have in FSTAB

/dev/sdc1            /windows/D           vfat       gid=users,umask=0002,utf8=true 0 0
/dev/sdb1            /windows/F           vfat       gid=users,umask=0002,utf8=true 0 0
/dev/sdd1		/windows/E		 vfat       gid=users,umask=0002,utf8=true 0 0

I was thinking about name mangling but am not sure how this one works. Since I cannot have folder with the same name on those partitions (example: Sambatest and SambaTEST) so it the setting I have now is the same or similar to Windows not allowing me the same name no matter the Case but this seems a little different. It is almost like Samba or Linux is keeping a cache of the previous name.

I will give another example of something I just tried to rename.

Folder video lan client and I renamed it to VLC for some reason it remembers the last case of each of those letters and still forces it into vlc.

thanks

maybe setting the preserve case = yes

it seems that the issue is FAT32 and not my Samba setup. Mangling has nothing to do with this issue since we are not dealing with 8.3 issues. This link says something about shortname=winnt I don’t know much about the switch. I’ve been trying to read about it and understand it. hxxp://ubuntuforums.org/archive/index.php/t-390062.html

Seems if my drives are EXT3 I may have a better chance. Is anyone using EXT3 and Vista and can you tell me if I was to remove these drives and put them in my Vista machine (recovery if needed) would I be able to view them with Vista or XP?

thanks

Sorry I hate to bump this again but I was wondering if anyone had an idea about this issue. Most people say to keep FAT if you are going to use Samba since if I had to the drive can be seen by a Windows workstation. I was curious what others are using for file system on their Samba setups. Also do you think the file system type would cause this issue with case?

thanks :\

sullysnet wrote:
> Sorry I hate to bump this again but I was wondering if anyone had an
> idea about this issue. Most people say to keep FAT if you are going to
> use Samba since if I had to the drive can be seen by a Windows
> workstation. I was curious what others are using for file system on
> their Samba setups. Also do you think the file system type would cause
> this issue with case?

I use ext3 as the file system on the Linux systems that publish Samba
shares. Windows clients have no problems with the file name. You
should read http://oreilly.com/catalog/samba/chapter/book/ch05_04.html
to see what happens with name mangling.

Larry

thanks I read about the name mangling but this doesn’t appear to be the same issue. The examples are not what I am talking about. If I rename a folder from samba to SAMBA it will revert back to the lower case. If I copy a folder form Windows up to Samba it will stay just as it is from Windows. It only seems to be an issue when I rename a folder and add in the caps to original name. I can rename it to something completely different and I think it would stay. I will need to test a few empty folders to see what I get in major rename, simple rename (caps or title) then a name that has some of the letters from the original name.

I still feel it is an FAT issue. I think I might upgrade one of my 500G HDD to a 1T drive so I can put the 500G in this machine. Or create a temp share on my Riser partition.

thanks

On Tue January 6 2009 10:26 pm, sullysnet wrote:

<snip>
>
>
> thanks I read about the name mangling but this doesn’t appear to be the
> same issue. The examples are not what I am talking about. If I rename a
> folder from samba to SAMBA it will revert back to the lower case. If I
> copy a folder form Windows up to Samba it will stay just as it is from
> Windows. It only seems to be an issue when I rename a folder and add in
> the caps to original name. I can rename it to something completely
> different and I think it would stay. I will need to test a few empty
> folders to see what I get in major rename, simple rename (caps or title)
> then a name that has some of the letters from the original name.
>
> I still feel it is an FAT issue. I think I might upgrade one of my 500G
> HDD to a 1T drive so I can put the 500G in this machine. Or create a
> temp share on my Riser partition.
>
> thanks
>
>
Sullysnet;

Create a test folder in lc from client1. Now change to uc on client1. On the
server the name will in fact have changed. Now from client2 connect to the
folder, you will find the folder name in uc. Now go back to client1, close
out the connection in IE or Network Places and reopen. The folder will
display in uc. This is Windows name caching that you see. Remember that
Windows is NOT case sensitive and views the two names as the same.

As for FAT, even Windows no longer uses FAT or FAT32. The default for XP and
VISTA is NTFS. FAT went out with Windows 9X.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

On Tue January 6 2009 11:21 pm, PV wrote:

> On Tue January 6 2009 10:26 pm, sullysnet wrote:
>
> <snip>
>>
>>
>> thanks I read about the name mangling but this doesn’t appear to be the
>> same issue. The examples are not what I am talking about. If I rename a
>> folder from samba to SAMBA it will revert back to the lower case. If I
>> copy a folder form Windows up to Samba it will stay just as it is from
>> Windows. It only seems to be an issue when I rename a folder and add in
>> the caps to original name. I can rename it to something completely
>> different and I think it would stay. I will need to test a few empty
>> folders to see what I get in major rename, simple rename (caps or title)
>> then a name that has some of the letters from the original name.
>>
>> I still feel it is an FAT issue. I think I might upgrade one of my 500G
>> HDD to a 1T drive so I can put the 500G in this machine. Or create a
>> temp share on my Riser partition.
>>
>> thanks
>>
>>
> Sullysnet;
>
> Create a test folder in lc from client1. Now change to uc on client1. On
> the server the name will in fact have changed. Now from client2 connect to
> the
> folder, you will find the folder name in uc. Now go back to client1, close
> out the connection in IE or Network Places and reopen. The folder will
> display in uc. This is Windows name caching that you see. Remember that
> Windows is NOT case sensitive and views the two names as the same.
>
> As for FAT, even Windows no longer uses FAT or FAT32. The default for XP
> and
> VISTA is NTFS. FAT went out with Windows 9X.

I carried out a little more testing on this. The behavior sullynet describes
seems to only occur with Network Places on XP. Using IE on XP or any method
on VISTA, a folder name changed from lc to uc shows up at once. With Network
Places on XP you need to refresh to see such changes (or reconnect to the
share.) Not checked with Windows 9X.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

This is exactly what I do not see no matter what. If I go into the command line from the Vista machine I will see the folder just as I see it in My Computer. My folder is called ww and I want to rename it to caps WW, it will in fact not change to the uc it will remain on the lc not matter what I do. In SecureCRT I navigate right to the folder and type a directory. It is shows in lc.

thanks
Oh and I do not use IE or anything thing else but Windows Explorere (My Computer) to navigate to my Samba shares.

Okay I just proved that is has to do with a FAT32 partition or my settings in FSTAB but I really feel it is an issue with FAT32 or VFAT.

I recreated a share in my home directory with is on Riser. I created a folder called TESTFOLDER and hit F5. Then I tried to rename that same folder to testfolder and hit F5. The folder reverts back to TESTFOLDER. I then tried to rename the folder to TestFolder and hit F5. Still it renames itself back to TESTFOLDER. If I do this same thing on my Riser partition it is normal. So I either have a setting wrong in FSTAB or it is a limitaion of VFAT in Linux.

On Wed January 7 2009 07:06 pm, sullysnet wrote:
<snip>
>
> This is exactly what I do not see no matter what. If I go into the
> command line from the Vista machine I will see the folder just as I see
> it in My Computer. My folder is called ww and I want to rename it to
> caps WW, it will in fact not change to the uc it will remain on the lc
> not matter what I do. In SecureCRT I navigate right to the folder and
> type a directory. It is shows in lc.
>
> thanks
> Oh and I do not use IE or anything thing else but Windows Explorere (My
> Computer) to navigate to my Samba shares.
>
>
sullysnet;

If ww is the share name in /etc/samba/smb.conf, you will need to change it in
smb.conf. If ww is the name of a directory within the share, perhaps you do
not have linux permissions to rename. In this later case, to which user and
group does it belong and what are the ugo permissions? What samba user do
you authenticate as on the server?

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

ww is a folder name and everything I am talking about is at the folder\file level. There is nothing going on before the share name, Server Name or anything. It is a folder\file rename and case issue. It actually has nothing to do with Samba and more or less and issue with how Linux is handling the VFAT partitions or again a setting in FSTAB.

thanks

I am using a normal user account that I setup for Samba access only. I have full rights to do whatever I want on the drives. I do not want them limited in anyway at all. Secure but not limited to a authenicated user.

thanks guys I think I’m going to see if they can move this to another section so I do not have to confuse it with a Samba issue. I hoping someone has come across this and has a work around for VFAT. I would like to move to Ext2 or 3 and get the driver for XP but doing that I would need to buy one more drive and move data off one drive, format it with Ext2 or 3 and copy it all back. That could take some time.