<Linux development> linux development tools-of-samba shared folder

<Linux development> linux development tools-of-samba shared folder

This article mainly explains the realization that files under ubuntu can be accessed under windows. The purpose is to facilitate the operation of files under Windows and facilitate development.

1. Install samba
installation command: sudo apt-get install samba

2. Modify
the configuration file Add the following content to the configuration file:
(1) Open the configuration file
Command: sudo vim /etc/samba/smb.conf
(2) Enter the content

[ts]										//名称用ubuntu的用户名吧
comment = share folder		//固定这个就行了
path=/home/ts						//设置共享的目录路径,下一步根据这里创建,作者这里是用户目录,所以就不需要在创建了
valid users=ts  //更改为自己的用户名
available=yes	以下选项按照作者这样设置就行了
browseable=yes
public=yes
writable=yes
force user=nobody
force group=nogroup
read only=no
create mask = 0777
directory mask = 0777

Set the access soft connection permission as follows:

在配置文件的“[global]”节的最后,加上下面三条设置:
follow symlinks = yes
wide links = yes
unix extensions = no

3. Create a shared folder
Create a corresponding folder according to the parameters of the configuration file;
command: the path name of the mkdir file

4. Add a user
If you don't add it, you can't access it, and you will be prompted with an error "prompt to deny access"
command line
sudo smbpasswd -a XXX (user)

5. Restart the samba service
Command: sudo /etc/init.d/smbd restart

6. Open the windows folder;
7. Right-click on "This Computer" and select "Map Network Drive";
8. Configure the link parameters
insert image description here
9. You can see a network disk in Windows
insert image description here
Finally, you can access it through this disk .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324485934&siteId=291194637