Menu

#33 @ symbol in folder name shown as %40

v1.0 (example)
open
None
5
2015-02-09
2015-02-09
No

If there is '@' symbol in a folder name, it is shown as '%40' in 'ls' directory listing. e.g. 'Hello@World' is shown as 'Hello%40World'

Discussion

  • Jonathan Liu

    Jonathan Liu - 2015-02-09

    I have the following in smbnetfs.conf:
    local_charset "utf-8"
    samba_charset "utf-8"

     
  • Mikhail Kshevetskiy

    This is an expected behavior. The '@' symbol is used as a divider to split user/password information from hostname in smbnetfs paths. As result '@' substituted by '%40' everywhere in paths/filenames.

    For example you can type something similar to

    cd mountpoint/user:password@host/share/somepath

    as result you'll enter to host 'host' share 'share' as user 'user' with password 'password'. This is insecure but very useful in some situations.

     
  • Jonathan Liu

    Jonathan Liu - 2015-02-09

    The behavior is different from mount.cifs which shows '@' as expected in the folder name.

     
  • Mikhail Kshevetskiy

    SMBNetFS uses libsmbclient library to work with samba networks. libsmbclient library has a feature of understanding paths like smb://user:password@host/share/path. This feature is used in SMBNetFS (supports of paths like mountpoint/user:password@host/share/somepath). The back side of this feature is the special handling of '@'.

    mount.cifs do not keep username and password in the file paths and hence do not have such problem.

    During development of SMBNetFS i have a choice of (1) use '@' as normal symbol and forbid paths like mountpoint/user:password@host/share/somepath or (2) support paths like mountpoint/user:password@host/share/somepath and escape '@' by some way. I choose the second way.

     

Log in to post a comment.