filenames containing ":" and "," - SMB

This is a discussion on filenames containing ":" and "," - SMB ; Hi everybody, I googled around for trying to find an answer to my question but found none, so please have mercy of my maybe already answered question. I need to backup Kmail files on a win2K machine. I can mount ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: filenames containing ":" and ","

  1. filenames containing ":" and ","

    Hi everybody,
    I googled around for trying to find an answer to my question but found none,
    so please have mercy of my maybe already answered question.

    I need to backup Kmail files on a win2K machine.

    I can mount the shared directory of the win2k machine without problems.
    I use:

    mount -t smbfs -o uid=mac,gid=users -o
    username=administrator //squalo/myshare /home/mac/mnt

    but when I try to do:

    cp 1127807303.23676.Hkto7:2,S /home/mac/mnt

    I get

    cp: cannot create regular file `/home/mac/mnt/1127807303.23676.Hkto7:2,S':
    No such file or directory

    What is the right way to mount the windows share?

    Thank you all.
    Mauro

  2. Re: filenames containing ":" and ","

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    MAC wrote:
    > Hi everybody,
    > I googled around for trying to find an answer to my question but found none,
    > so please have mercy of my maybe already answered question.
    >
    > I need to backup Kmail files on a win2K machine.
    >
    > I can mount the shared directory of the win2k machine without problems.
    > I use:
    >
    > mount -t smbfs -o uid=mac,gid=users -o
    > username=administrator //squalo/myshare /home/mac/mnt
    >
    > but when I try to do:
    >
    > cp 1127807303.23676.Hkto7:2,S /home/mac/mnt
    >
    > I get
    >
    > cp: cannot create regular file `/home/mac/mnt/1127807303.23676.Hkto7:2,S':
    > No such file or directory
    >
    > What is the right way to mount the windows share?


    IIRC, this problem has nothing to do with Linux and/or smbfs mount options.

    It has /everything/ to do with the filenaming restrictions inherent in Microsoft
    Windows. MSWindows cannot handle filenames that contain certain characters
    imbedded in them. The colon (':') is forbidden, as is any of \ / * < > ? " |

    You'll just have to find another way to back up your Kmail files. Perhaps
    tarring or zipping the kmail directory would be better; you can control the name
    of the file created by tar, gz or zip, and make sure that it does not contain
    any of the forbidden characters.


    - --
    Lew Pitcher
    IT Specialist, Enterprise Data Systems,
    Enterprise Technology Solutions, TD Bank Financial Group

    (Opinions expressed are my own, not my employers')
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (MingW32)

    iD8DBQFDO/0IagVFX4UWr64RApNiAJ0e1HWoWrNMqXbZpCR3RnEy4JWVLgCg wbRR
    al3McMkG+IHpxYLCADA5/QQ=
    =2FPs
    -----END PGP SIGNATURE-----

  3. Re: filenames containing ":" and ","

    Lew Pitcher wrote:


    >
    > IIRC, this problem has nothing to do with Linux and/or smbfs mount
    > options.
    >
    > It has /everything/ to do with the filenaming restrictions inherent in
    > Microsoft Windows. MSWindows cannot handle filenames that contain certain
    > characters imbedded in them. The colon (':') is forbidden, as is any of \
    > / * < > ? " |



    Lew, thank you very much for your answer. I too was thinking about that
    until I found that if you do the other way 'round the file is transferred.
    I (try to) explain better that I can.
    If I run smbd and nmbd on my linux pc and transfer the file *using the
    windows PC*, the file is transferred, though with a strange name. The name
    is, say, qwerty::1234 on the linux pc and becomes QXQE66~H on windows. If
    then I transfer it back to the linux pc (always using the windows pc) the
    file is restored with the correct name qwerty::1234.

    As I explained in my previous message if I instead mount the windows share
    under linux and try to "cp" qwerty::1234 to the mounted share I get the
    error.

    I was just curious to know why I cannot have a symmetric behavior in the
    trasfer.

    I hope to have explained clearly enough.
    >
    > You'll just have to find another way to back up your Kmail files. Perhaps
    > tarring or zipping the kmail directory would be better; you can control
    > the name of the file created by tar, gz or zip, and make sure that it does
    > not contain any of the forbidden characters.


    I wanted to use rsync. I have a "work" directory on my laptop that I want to
    backup daily on the other pc. With rsync I can only transfer the files that
    have changed.

    ciao,

    Mauro


+ Reply to Thread