ARMxy Implements CIFS Network File System Protocol Functions
Categories

ARMxy Implements CIFS Network File System Protocol Functions

CIFS (Common Internet File System) is a network file system protocol that enables file sharing between Linux and Windows systems. It can function both as a client and a server (to provide sharing services).
ARMxy Implements CIFS Network File System Protocol Functions
Case Details
CIFS (Common Internet File System) is a network file system protocol that enables file sharing between Linux and Windows systems. It can function both as a client and a server (to provide sharing services). This document describes how to install and configure a CIFS server on a Linux system, mount a CIFS share on Linux, and access a CIFS share on Windows. We support CentOS, Debian, and Windows environments.

I. ARMxy as a Client to Mount a CIFS Share

1. Install CIFS Tools

On Debian or Ubuntu, install the cifs-utils package:

apt update

apt install -y cifs-utils

As shown in the figure below:

2. Create a Mount Point
Create a mount point directory in the device:

mkdir /mnt/<Mount File Name>

3. Create a CIFS Shared Folder on Windows
(1) Select and create a folder: Right-click and select "New Folder".

(2) Right-click the created folder → Select "Properties" → Click "Sharing" → Select "Advanced Sharing" → Check "Share this folder" → Click "Permissions" → Assign access permissions to users in the "Group or user names" list.

4. Manually Mount a CIFS Share on ARMxy
Use the mount command to mount the CIFS share. Assume the IP address obtained by Windows is 192.168.1.48, the share name is share, the mount point is /mnt/cifs, and the username and password are your_username and your_password respectively.

mount -t cifs //192.168.1.48/share /mnt/cifs -o username=your_username,password=your_password


5. Permanently Mount a CIFS Share
To make the CIFS share mount automatically after a system restart, add the mount configuration to the /etc/fstab file:

//192.168.1.48/share /data/cifs cifs credentials=/etc/cifs-credentials,uid=1000,gid=1000 0 0
Storing passwords in plain text in fstab poses a security risk, so we store the credentials in a separate file:
nano /etc/cifs-credentials
Write the following content into the file:
username=cife
password=123456
Set permissions for the file:
chmod 600 /etc/cifs-credentials

6. Notes
(1) CIFS supports batch mounting.
(2) If the firmware for cifs, md4, or sha512 is missing, please contact us.

II. ARMxy as a CIFS Server
The CIFS server relies on Samba to provide file sharing functionality. First, we need to install Samba on ARMxy.

1. Install Samba on Debian or Ubuntu

apt install -y samba samba-common-bin

As shown in the figure below:

2. Configure Samba Share

After installation, edit the Samba configuration file /etc/samba/smb.conf and add the shared directory configuration at the end of the file. Assume we want to share the directory /mnt/share and require username and password for access.
Edit the smb.conf configuration file:
vi /etc/samba/smb.conf
Add the following configuration at the end of the file:
[share]
   path = /mnt/share
   browsable = yes
   writable = yes
   guest ok = no
   valid users = your_username
  •  path: Specifies the path to the shared directory.
  •  browsable: Allows browsing of the shared directory.
  •  writable: Allows writing to the shared directory.
  •  guest ok: Disables anonymous access.
  •  valid users: Specifies the users who can access this share. 

3. Create a Shared Directory and Set Permissions
Create the shared folder and set permissions:

mkdir -p /mnt/share
chown -R your_username:your_username /mnt/share

4. Configure Samba User
Add a Samba user:

smbpasswd -a your_username

5. Start the Samba Service

systemctl enable smbd nmbd
systemctl start smbd nmbd

6. Quick Access on Windows via the "Run" Dialog Box
Press Win+R to open the "Run" dialog box;

Enter the shared path (in the same format as above), for example: \\192.168.1.181\share, and click "OK";

Enter the Samba username and password to access the share.
Leave a message
FirstName*
LastName*
Email*
Message*
Code*
Verification Code
We use Cookie to improve your online experience. By continuing browsing this website, we assume you agree our use of Cookie.