In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
/ / linux rw windows share folder
Temporary mount, lose this mount point if restart
Sudo mkdir / home/sharefolder
Sudo mount-t cifs-o username=username,password=pwd / / ip/sharefoldername / home/sharefolder
2. Auto mount point when system start
Sudo gedit / etc/fstab
Add 2 line:
/ / ip/sharename / home/sharefolder cifs defaults,username=usrname,password=share 0 2
Or (if everyone is ok)
/ / ip/sharename / home/sharefolder cifs defaults 0 2
/ / ip/sharename / home/sharefolder nfs defaults 0 2
3.smbclient
Sudo apt-get install smbclient
Smbclinet-- user=username / / ip/sharename
Enter share's password: (enter password)
/ / operae like ftp command
Smb:/ > help
Exit get getfacl geteas hardlink help history iosize lcd link
Smb:/help command / / details
/ / windows rw linux share folder
/ / install samba, ubuntu16 share folder for windows user
Sudo apt-get install samba
Sudo apt-get install smbclient
Sudo mkdir-p / home/sharefolder
Sudo chmod 777 / home/sharefolder / / sharefolder permissions. Default is 755. Owner can write only
Sudo cp / etc/samba/smb.conf / etc/samba/smb.conf.bak / / backup before edit
Sudo gedit / etc/samba/smb.conf
/ / config smb.conf
Usershare owner only = false / / add this line after Global Setting
/ / add follow at bottom of smb.conf
[sharefolder]
Path = / home/sharefolder
Browseable = yes
Write = yes
Public = yes
Comment = smb share folder test
/ / restart samba service
Sudo service smbd restart
/ / client test
Smbclient-L / / localhost/sharefolder / / linux client test
\\ ip\ sharefolder / / windows client test
/ / User access control
Sudo useradd username / / a1, a2, b1, b2, c1,c2
Sudo groupadd groupname / / aa, bb, cc
Sudo usermod-g groupname username / / (a1mema2-> aa) (b1memb2-> bb) (c1recoverc2-> cc)
Sudo mkdir / home/share/foldera / / foldera,folderb,folderc folderd,foldere
Sudo chomd 777 / home/share/*
Sudo gedit / etc/samba/smb.conf
[sharefoldera]
Comment=sharefoldera, (r) a1 ~ (1) ~ (1) ~ (1) ~ (1), (w) @ aa
Path=/home/share/foldera
Public=no
Valid users= A1 ~ b1 ~ 1 ~ AA
Write list = @ aa
[sharefolderb]
Comment=sharefolderb, (r) A1 ~ (cc) ~ (m) @ bb
Path=/home/share/folderb
Public=no
Valid users= A1, cc1, BB.
Write list = @ bb
[sharefolderc]
Comment=sharefolderc, (r) @ bb,@cc (w) @ cc
Path=/home/share/folderc
Public=no
Valid users = @ bb,@cc
Write list = @ cc
[sharefolderd]
Comment=sharefolderd,all users read only
Path=/home/share/folderd
Public = yes
Readonly = yes
[sharefoldere]
Comment=sharefoldere, (rw) all user
Path=/home/share/foldere
Public = yes
Writable = yes
/ / share folder configuration
[share] # the share name of the share
Comment = smb share test # remarks for the share
Path = / home/share # share path
Allow hosts = host (subnet) # set the workgroups or domains allowed by this Samba server
Deny hosts = host (subnet) # set workgroups or domains rejected by this Samba server
Available = yes | no # sets whether the shared directory is available
Browseable = yes | no # sets whether the shared directory can be displayed
Writable = yes | no # specifies whether this directory is writable by default, or you can use readonly = no to set writeability
Public = yes | no # indicates whether the shared resource can be accessed by the tourist account. Guest ok = yes is actually the same as public = yes
User = user, @ group # user sets all users who may use the shared resource, or you can use @ group to represent all members of the group group, separated by spaces or commas between different items
Valid users = user, @ group # specifies the users and groups that can use the shared resource
Invalid users = user, @ group # specifies users and groups that cannot use the shared resource
Read list = user, @ group # specifies users and groups that can only read the shared resource
Write list = user, @ group # specifies the users and groups that can read and write to the shared resource
Admin list = user, @ group # specifies the users and groups that can manage the shared resource (including read and write, permission grant, etc.)
Hide dot files = yes | no # indicates whether to hide it like UNIX to "." A file that begins with a number.
Create mode = 0755 # indicates the properties of the newly created file, usually 0755
Directory mode = 0755 # indicates the properties of the newly created directory, usually 0755
Sync always = yes | no # indicates whether to synchronize after writing to the shared resource
Short preserve case = yes | no # indicates whether the file name is case sensitive
Preserve case = yes | no # indicates whether to maintain case
Case sensitive = yes | no # indicates whether it is case-sensitive. Generally, no is selected, otherwise an error may occur.
Mangle case = yes | no # indicates mixed case
Default case = upper | lower # indicates whether the default file name is all uppercase or lowercase
Force user = testuser # enforces who is the owner of the creation file. If I have a directory that guest can write to, then guest can be deleted. If I use force user= testuser to force the owner of the file to be testuser, and limit create mask to 0755, then guest cannot be deleted.
Wide links = yes | no # indicates whether symbolic connections outside sharing are allowed. For example, a connection in a shared resource points to a file or directory in a non-shared resource. Setting wide links = no will make the connection unavailable.
Max connections = 100 # set the maximum number of simultaneous connections
Delete readonly = yes | no # indicates whether to delete files that have been defined as read-only in the shared resource
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.