Results 1 to 7 of 7

Thread: error copying from smb drive

  1. #1
    Join Date
    Apr 2021
    Beans
    4

    error copying from smb drive

    Hello,

    I'm using Ubuntu 20.04. I can mount an external drive (from the company) successfully from the file manager using the file manager application (with credentials), with smb:// scheme. I can then browse the content of the network drive.


    but when I try to copy (cp) from that drive to the local drive, I get some File Not Found error. The file exists and is correct, because, if instead of cp I use 'file' i can get the description of the file.
    Also, this error seems to happen only with large file (my tests are on 80MB files), but smaller pass successfully.


    we want to run local programs that use data from the network drive directly, is it a good way to setup (using a smb drive, mounted from Nautilus), or is there any other better way?


    These programs we want to run raise a file reading error as well. actually, a simple open/read python program reproduces it. In detail, this python script will start successfully read some lines (actually almost all lines), and then the exception occurs.


    If I copy the file from a windows station, I can get it and read it successfully.


    please help me to identify the issue.
    Last edited by bertrandb; 3 Weeks Ago at 07:06 AM.

  2. #2
    Join Date
    May 2010
    Beans
    1,270

    Re: error copying from smb drive

    What is the cp command you are issuing as well as an the pwd?

  3. #3
    Join Date
    Apr 2021
    Beans
    4

    Re: error copying from smb drive

    this is the command, sorry i have to hide some path.
    but basically it is run from home, and the cp command uses the path of gvfs (i have tried to use symbolic link as well, just in case.. no sucess)

    Code:
    user@station01:~$ cp /run/user/1004/gvfs/smb-share\:server\=server.net\,share\=shr\$/Path/to/My\ file/test.xml target.xml
    cp: error reading '/run/user/1004/gvfs/smb-share\:server\=server.net\,share\=shr\$/Path/to/My\ file/test.xml': No such file or directory
    Last edited by slickymaster; 3 Weeks Ago at 11:44 AM. Reason: code tags

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,581
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: error copying from smb drive

    Mount the share into the file system with an entry in /etc/fstab.

    https://wiki.ubuntu.com/MountWindowsSharesPermanently
    Last edited by SeijiSensei; 3 Weeks Ago at 12:26 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Dec 2009
    Beans
    6,521

    Re: error copying from smb drive

    user@station01:~$ cp /run/user/1004/gvfs/smb-share\:server\=server.net\,share\=shr\$/Path/to/My\ file/test.xml target.xml
    cp: error reading '/run/user/1004/gvfs/smb-share\:server\=server.net\,share\=shr\$/Path/to/My\ file/test.xml': No such file or directory
    Are you sure that is the correct gvfs mount point?

    If you run the following:
    Code:
    ls -al /run/user/1004/gvfs
    Isn't it something more like: /run/user/1004/gvfs/smb-share:server=server.net,share=shr.....

  6. #6
    Join Date
    Apr 2021
    Beans
    4

    Re: error copying from smb drive

    yes, it's a weird path, but this is it. i can list the content with /run/user/1004/gvfs/smb-share:server=server.net,share=shr.... and also copy small files from it.

  7. #7
    Join Date
    Apr 2021
    Beans
    4

    Re: error copying from smb drive

    "Mount the share into the file system with an entry in /etc/fstab."

    thanks, right, doing without using nautilus sharing functionality, i can mount the drive and read file successfully, thanks. may be I will go this way.

    I liked the nautilus solution as each user can just mount their drive on their own user folder, with their own credential and with no sudo.
    (mulitple users may access that drive, each one may have different auth level).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •