cancel
Showing results for 
Search instead for 
Did you mean: 

Special characters in Filename using CIFS

toltech
Champ in-the-making
Champ in-the-making
L.S.,
We mount alfresco using a CIFS mount using following command in fstab:
//localhost/alfresco /mnt/alfresco  cifs credentials=/etc/.alfresco,uid=alfresco,gid=alfresco,iocharset=utf8

We now notice some filenames contain '[' or ']'.
However valid names in Alfresco the mentioned characters are unfortunately special characters under Linux.

The problem we have is that we can not "stat" these files.
Example
test[1].txt
Can be used, renamed from within a windows explorer mount and also from the web interface. This means there is no way we can prevent users from using these characters.
But from a Linux CIFS mount we get following result:
cp test[2].txt /tmp/a
cp: cannot open `test[2].txt' for reading: No such file or directory

All escaping sequences we can think of also give this error (mind the difference in the open and stat of the error output)
cp test\[2\].txt /tmp/a
cp: cannot stat `test[2].txt': No such file or directory
cp 'test[2].txt' /tmp/a
cp: cannot stat `test[2].txt': No such file or directory
cp 'test\[2\].txt' /tmp/a
cp: cannot stat `test\\[2\\].txt': Invalid argument
cp "test\[2\].txt" /tmp/a
cp: cannot stat `test\\[2\\].txt': Invalid argument

We use this mount to make a filebased backup of the Alfresco repository using rsync and is therefore very valuable to us. Do we need to use special mount options to prevent this? Or is this a deeper problem in Linux file system access.

Any ideas?
Regards,
Robert
1 REPLY 1

toltech
Champ in-the-making
Champ in-the-making
Problem solved:
We have upgraded from 2.2. to 3.0
regards,
Robert