This article is a mirror article of machine translation, please click here to jump to the original article.

View: 3300|Reply: 1

Linux (CentOS) copies files to the Samba server

[Copy link]
Posted on 8/26/2023 1:14:41 PM | | | |
Requirements: I bought a new NAS machine, turned on the Samba service for LAN devices to store files in the NAS, and there is a Linux (CentOS) server that needs to upload files to the NAS through the smb protocol.

First, CentOS needs to install the smbclient client, the command is as follows:

Then, log in to the samba server via the command line with the following command:

As shown below:



When I tried to upload /root/anaconda-ks.cfg to the NAS, the error was as follows:

smb: \> put /root/anaconda-ks.cfg
NT_STATUS_OBJECT_PATH_NOT_FOUND opening remote file \root\anaconda-ks.cfg
Solution, you need to switch to the Linux upload directory with the following command:



Here are some examples of commands you can use in interactive mode:

  • ls- Lists the files and directories in the current directory
  • cd- Change the current directory
  • get- Download the file from the Samba server to the local system
  • put- Uploads files from the local system to the Samba server
  • mkdir - creates a new directory on the Samba server
  • rm- Deletes a file or directory from the Samba server


(End)





Previous:DNS-over-HTTPS and DNS-over-TLS for domain name resolution
Next:ESXI 7 is unable to send the keyboard ctrl+alt+delete to the virtual machine
Posted on 8/28/2023 9:37:39 AM |
CentOS has stopped updating, it is recommended to use the stable branch: rocky9 system download address:https://rockylinux.org/download
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com