業務用エアコン関連の技術情報、エラーコード、環境問題対策に関する別サイト「エアコンの安全な修理・適切なフロン回収」

Ubuntu Server25.10 : FTP(Vsftpd) , Samba Install

FTP server

1. Vsftpd Installation and configuration

①Install

Allow PORT 21 at UFW

Configuration File Changes

Edited content

Line 14 : Change
Listen=YES

Line 22 : Change
Listen_ipv6=NO

Line 31 : Uncomments
write_enable=YES

Line 35 : Uncomments
local_umask=022

Line 99-100 : Uncomments(Allow uploads and downloads via ASCII)
ascii_upload_enable=YES
ascii_download_enable=YES

Line 122 : Uncomments
chroot_local_user=YES

Line 123 : Uncomments
chroot_list_enable=YES

Line 125 : Uncomments
chroot_list_file=/etc/vsftpd.chroot_list

Line 131 : Uncomments(Enable bulk transfer of entire directories)
ls_recurse_enable=YES

Creating vsftpd.chroot_list

Restart vsftpd

Start FileZilla and select "Site Manager" from the "File" menu.

Click on "New site"

Enter the following settings for each item and click "Connect"
Protocol : FTP- File Transfer Protocol
Host : IP address of the server
Port :
Logon Ask for password
User  : General user name (server login user)

Password : logd in user password

If the connection is successful, the server directory is displayed on the right and the Windows directory on the left.

2. Vsftpd Over SSL/TLS

①Create a self-signed certificate.
If you are using a trusted, legitimate certificate such as Let's Encrypt, you do not need to do this work.

➁Edit Vsftpd configuration file

Edited content

Line 149,150: comment out
#rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

Line 151 : Change
ssl_enable=YES

Add the following after line 152:
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_ciphers=HIGH
force_local_data_ssl=YES
force_local_logins_ssl=YES

Restart Vsftpd

Start FileZilla and check
As before, select "Site Manager" from the "File" menu, select the appropriate server, click "Connect," and the following screen will appear.

File server installation with Samba

Build a file server with access rights that requires user authentication with Samba.
Installation Procedure
(1) Create a shared folder with access rights that requires user authentication.
(2) Create a group with access rights
(3)Create users belonging to groups that can be accessed
(4)Edit configuration file

3.1 samba Install

3.2 Create a shared folder (smbshare)

3.3 Create accessible group (smbgroup)

3.4 Configuration File Edit

Edited content

Line 25 :
[global]
unix charset = UTF-8 # Add
dos charset = CP932 # Add

Line 41 : Add networks to allow access
interfaces = 127.0.0.0/8 192.168.11.0/24 ens33

Line 101 : Comment out and add below
#map to guest = bad user
security = user

Add to the last line
Set any shared name
[Smbshare]
# Specify a shared folder
path = /home/smbshare
# Allow posting
writable = yes
# Do not allow guest users
guest ok = no
# [smbgroup] Allow access only to the group
valid users = @smbgroup
# Set the group to [smbgroup] when creating files
force group = smbgroup
# Set the permissions to [770] when creating the file.
force create mode = 770
# Set the permissions to [770] when creating folders.
force directory mode = 770
# Inherit permissions from the parent folder
inherit permissions = yes

3.5 SMB Restart

3.6 User (smbuser) registration, password setting, group registration

3.7 UFW to allow Samba services

3.8 Accessing shared directories from Windows 11

Connect from Windows Explorer
Open Explorer and enter "\\server IP" (in this case 192.168.11.83) in the address field.
Access the server.

You will be asked to enter your authentication information.
User name : User name created in "3.6 User (smbuser) Registration, Password Setting, Group Registration"
Password : Password for the above user
Click "OK"

Confirm that files and folders are newly created when the shared directory information is displayed.

Copied title and URL