DateModifiedViewsCategory

Heterogeneous networks are common now. Those networks include computers with Windows and Unix Operation Systems (OS). Exchange files between those Operation Systems is a trivial task. It can be done with command line interface (CLI) or Graphic User Interface (GUI). Both methods give the same results but it depends on usage, user technical level, and so on which method is suitable.

Access with CLI

  1. Install Samba client and other related libraries on your Linux computer.

    sudo yum -y install samba-client samba-common cifs-utils
    
  2. Create mount point.

    sudo mkdir -p /mnt/F_drive
    
  3. Check connection to Windows server.

    smbclient -L //window_server -U user_name
    
  4. Access Windows shared folder.

    sudo mount.cifs //window_server/F_shared_drive /mnt/F_drive -o rw,username=user,file_mode=0777,dir_mode=0777
    

    Parameters

    • rw - read write access
    • ro - read only access
    • file_mode=0777,dir_mode=0777 - Linux access to shared folder. The sample grants full access to everybody.

  5. Troubleshooting

    • Invalid argument error

      mount error(22): Invalid argument
      Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
      

      Possible issue is missing shared folder in UNC: //window_server rather than //window_server/F_shared_drive.

    • Device or resource busy error

      mount error(16): Device or resource busy
      Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
      

      Possible issue is that your mount is used. You need to unmount your mount point, for example,

      sudo umount /mnt/F_drive
      
    • Could not resolve address error

      mount error: could not resolve address for window_server: Unknown error
      

      Possible issue is shared folder computer name. You need to replace name with IP address, for example, replace //window_server with 192.168.0.2.

Access with GUI

Files is a default file manager in GNOME desktop and it has embedded Samba client.

  1. Open Files, go to Other Locations, and type in your shared folder path, for example, smb://window_server/F_shared_drive.

    CentOS Files file manager Other Locations

  2. Fill out connection form.

    CentOS Files file manager Other Locations

  3. Troubleshooting.

    • Unable to access location. Failed to retrieve share list from server: No such file or directory error.

      There are 2 possible reasons.

      1. Address can not be resolved and you need to use IP address rather than computer name, for example, 192.168.0.2.

      2. It is used the SMB version 1.0 protocol in Files file manager. You might need to try one of the options below.

        a) Update your Linux computer.

        sudo yum update
        

        b) Downgrade SMB protocol to version 1.0 in your Windows server.

        • Open Windows Explorer and key in Control Panel\Programs in address bar

          Windows Explorer Control Panel Program

        • Go to Turn Windows features on or off

          Turn Windows features on or off

        • Check SMB 1.0/CIFS Server setting

          Windows SMB file sharing support

    • Unable to access location. Failed to mount Windows share: Connection time out error.

      Enable file in printer sharing in Windows 10. Open Advanced sharing settings form typing Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settings in Windows Explorer address bar.

      Windows 10 Advanced sharing settings

Resources


Comments

comments powered by Disqus