WO2017097025A1 - 一种网络设备的Samba配置管理方法及系统 - Google Patents

一种网络设备的Samba配置管理方法及系统 Download PDF

Info

Publication number
WO2017097025A1
WO2017097025A1 PCT/CN2016/101400 CN2016101400W WO2017097025A1 WO 2017097025 A1 WO2017097025 A1 WO 2017097025A1 CN 2016101400 W CN2016101400 W CN 2016101400W WO 2017097025 A1 WO2017097025 A1 WO 2017097025A1
Authority
WO
WIPO (PCT)
Prior art keywords
shared
storage device
samba
directory information
network device
Prior art date
Application number
PCT/CN2016/101400
Other languages
English (en)
French (fr)
Inventor
吕家剑
Original Assignee
上海斐讯数据通信技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海斐讯数据通信技术有限公司 filed Critical 上海斐讯数据通信技术有限公司
Priority to US15/538,674 priority Critical patent/US20170371894A1/en
Priority to EP16872219.7A priority patent/EP3229403B1/en
Publication of WO2017097025A1 publication Critical patent/WO2017097025A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Definitions

  • the present invention relates to a computer technology, and in particular, to a Samba configuration management method and system for a network device.
  • Routers generally provide samba services that can share storage files in the router. Users can set the share by modifying the configuration file of the samba server. These configuration information includes accessible users, shared directories, and read and write permissions.
  • the general practice is to set a shared directory and add one to the samba configuration file. Delete a shared directory, and delete the information in the samba configuration file.
  • most routers are external storage devices (such as U disk, tf card, etc.), they are frequently plugged and unplugged, which causes the shared directory path and actual path of the samba configuration file to be mismatched, resulting in inaccessible users. .
  • the drive letter is F drive
  • share the F drive the shared directory of the configuration file record is the F drive
  • the drive letter of the U disk 2 becomes the F disk
  • the shared directory of the configuration file record is still the original F disk, which will cause a large number of invalid configurations in the samba configuration file.
  • the present invention aims to provide a Samba configuration management method and system for a network device, which is used to solve the problem in the Samba configuration file caused by the insertion and removal of an external storage device of the network device in the prior art. Invalid configuration issue.
  • the present invention provides a Samba configuration management method for a network device, where the Samba configuration management method of the network device includes: adding a shared directory information to a shared directory when a storage device is set to a configuration file of the Samba server, and storing the shared directory information in a shared backup file of the storage device; the shared directory information includes a shared path; when detecting that the storage device is unplugged from the network device, The storage device-related shared directory information is deleted from the configuration file of the Samba server; when it is detected that the storage device is inserted into the network device, the shared directory information in the shared backup file of the storage device is read one by one, and the following processing is performed: Obtaining a shared path of the shared directory information, modifying a drive letter of the shared path to a current drive letter of the storage device, determining whether the modified shared path exists, and if yes, adding the shared directory information to In the configuration file of the Samba server; if not, the shared directory information is deleted in the shared backup file.
  • the shared backup file is stored in a root directory of the storage device.
  • the Samba configuration management method of the network device further includes: deleting a shared directory of a storage device, deleting the shared directory information from a configuration file of the Samba server, and deleting the shared directory information from the The shared backup file of the storage device is deleted.
  • the Samba configuration management method of the network device further includes: when modifying a shared directory of a storage device, modifying the shared directory information in a configuration file of the Samba server, and in the shared backup file of the storage device Modify the shared directory information.
  • the network device comprises a router.
  • the present invention provides a Samba configuration management system for a network device
  • the Samba configuration management system of the network device includes: a shared information management module, configured to add the shared directory information to the Samba server when setting a shared directory of a storage device And storing the shared directory information in the shared backup file of the storage device; the shared directory information includes a shared path; and the device unplugging management module is configured to remove the network device when detecting the storage device And deleting the shared directory information related to the storage device from the configuration file of the Samba server; the device insertion management module is configured to read the shared backup of the storage device one by one when detecting that the storage device is inserted into the network device
  • the shared directory information in the file is processed as follows: the shared path of the shared directory information is obtained, the drive letter of the shared path is modified to the current drive letter of the storage device, and the modified shared path is determined to exist. If it exists, the shared directory information is added to the configuration file of the Samba server. In the piece; if not, the shared directory information is deleted in
  • the shared backup file is stored in a root directory of the storage device.
  • the file attribute of the shared backup file is a hidden file.
  • the shared information management module is further configured to: when deleting a shared directory of a storage device, delete the shared directory information from a configuration file of a Samba server, and use the shared directory information from the storage device The shared backup file is deleted.
  • the shared information management module is further configured to: when modifying a shared directory of a storage device, modify the shared directory information in a configuration file of the Samba server, and modify the shared backup file in the storage device Total Achievement directory information.
  • the network device comprises a router.
  • the Samba configuration management method and system for a network device of the present invention have the following beneficial effects: by backing up the configuration information in the storage device, after re-inserting the router, the configuration information is imported into the samba configuration file, thereby solving the problem.
  • the sharing failure occurs due to a change in the path of the external device.
  • FIG. 1 is a schematic flowchart diagram of an embodiment of a Samba configuration management method for a network device according to the present invention.
  • FIG. 2 is a block diagram showing an embodiment of a Samba configuration management system for a network device of the present invention.
  • the invention provides a Samba configuration management method for a network device.
  • Samba is a toolkit that implements the SMB (Session Message Block) protocol on Unix, or the NETBIOS/LanManager protocol.
  • SMB Server Messages Block
  • SMB is a communication protocol for sharing files and printers on a local area network. It provides shared services for files and printers between different computers in a local area network. You can set up the share by modifying the Samba configuration file. These configuration information includes accessible users, shared directories, and read and write permissions.
  • the general practice is to set up a shared directory in the Samba configuration file (smb.conf). Add one to delete a share Directory, just delete the information in the Samba configuration file.
  • the solution of the present invention can backup the configuration information in the storage device, and after the network device is reinserted, the configuration information is imported into the samba configuration file, thereby solving the problem that the sharing failure occurs due to the change of the path of the external device.
  • the network device includes a router.
  • the Samba configuration management method of the network device includes:
  • Step S1 When a shared directory of a storage device is set, the shared directory information is added to a configuration file of the Samba server, and the shared directory information is stored in a shared backup file of the storage device;
  • the information includes the shared path.
  • the shared directory information refers to related information of the shared directory, and may include a shared path, a shared name, a user that can be accessed, and read and write permissions.
  • the shared backup file can be stored under the root directory of the storage device.
  • the file attribute of the shared backup file is a hidden file.
  • the storage device is an external storage device, including a USB flash drive, a tf card, and the like.
  • Step S2 When it is detected that the storage device is unplugged from the network device, the shared directory information related to the storage device is deleted from the configuration file of the Samba server.
  • the network device includes a router.
  • Step S3 when detecting that the storage device is inserted into the network device, reading the shared directory information in the shared backup file of the storage device one by one, and performing the following processing: acquiring a shared path of the shared directory information, and using the shared path The drive letter is modified to the current drive letter of the storage device, and it is determined whether the modified shared path exists. If yes, the shared directory information is added to the configuration file of the Samba server; if not, the The shared directory information is deleted from the shared backup file.
  • the Samba configuration management method of the network device further includes: deleting a shared directory of a storage device, deleting the shared directory information from a configuration file of the Samba server, and deleting the shared directory information from The shared backup file of the storage device is deleted.
  • the Samba configuration management method of the network device further includes: when modifying a shared directory of a storage device, modifying the shared directory information in a configuration file of the Samba server, and sharing the backup in the storage device. Modify the shared directory information in the file.
  • the method steps S1, S2, and S3 of the present invention can be arbitrarily selected and executed as needed, and are not limited to the above order.
  • the network device is a router.
  • the Samba configuration management method of the network device includes: 1. Setting a shared directory: when a router shares a folder of a device, the configuration file smb.conf of the samba server is modified, and related information of the sharing (for example, a shared path) is used. , share name, accessible users, read and write permissions, etc.) Make a backup in the root directory of the device.
  • the backup file attribute is a hidden file. When deleting or modifying a share, the same backup file in the root directory of the device is also modified. 2. Plug in and connect external storage devices. Including: A: When inserting a storage device, the CPU determines whether the storage device has a backup of the samba configuration file.
  • the invention provides a Samba configuration management system for a network device.
  • the Samba configuration management system of the network device is capable of applying the Samba configuration management method of the network device as described above.
  • the network device includes a router.
  • the Samba configuration management system 1 of the network device includes a shared information management module 11, a device extraction management module 12, and a device insertion management module 13. among them:
  • the shared directory information is added to the configuration file of the Samba server, and the shared directory information is stored in the shared backup file of the storage device;
  • the shared directory information includes a shared path.
  • the shared directory information refers to related information of the shared directory, and may include a shared path, a shared name, a user that can be accessed, and read and write permissions.
  • the shared backup file can be stored under the root directory of the storage device.
  • the file attribute of the shared backup file is a hidden file.
  • the shared information management module 11 is further configured to: when deleting a shared directory of a storage device, delete the shared directory information from a configuration file of the Samba server, and use the shared directory information from the The shared backup file of the storage device is deleted. In an embodiment, the shared information management module 11 is further configured to: when modifying a shared directory of a storage device, modify the shared directory information in a configuration file of the Samba server, and share the backup file in the storage device. Modify the shared directory information.
  • the storage device is an external storage device, including a USB flash drive, a tf card, and the like.
  • the device unplugging management module 12 is connected to the shared information management module 11 for deleting the shared directory information related to the storage device from the configuration file of the Samba server when detecting that the storage device is unplugged from the network device.
  • the network device includes a router.
  • the device insertion management module 13 is connected to the shared information management module 11 for reading the shared directory information in the shared backup file of the storage device one by one when detecting that the storage device is inserted into the network device, and performing the following processing: acquiring the Sharing a shared path of the directory information, modifying the drive letter of the shared path to the current drive letter of the storage device, determining whether the modified shared path exists, and if present, adding the shared directory information to the Samba server In the configuration file; if not, the shared directory information is deleted in the shared backup file.
  • the Samba configuration management method and system of the network device of the present invention restores the configuration information to the samba configuration file after re-inserting the router by backing up the configuration information in the storage device, thereby solving the path of the external device. Change, causing sharing failures. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种网络设备的Samba配置管理方法及系统。网络设备的Samba配置管理方法包括:设置一个共享目录时,将共享目录信息加入到Samba配置文件中,并将共享目录信息存储到存储设备的共享备份文件中;当检测到存储设备拔出网络设备时,将存储设备相关的共享目录信息从Samba配置文件中删除;当检测到存储设备插入网络设备时,逐条读取存储设备的共享备份文件中的共享目录信息,并作如下处理:获取共享目录信息的共享路径,将共享路径的盘符修改成存储设备的当前盘符,判断修改后的共享路径是否存在,如果存在,则将共享目录信息加入到Samba配置文件中。本发明能解决因外接设备路径发生改变,造成共享失效的问题。

Description

一种网络设备的Samba配置管理方法及系统
本申请要求2015年12月09日提交的申请号为:201510908147.5、发明名称为“一种网络设备的Samba配置管理方法及系统”的中国专利申请的优先权,其全部内容合并在此。
技术领域
本发明涉及一种计算机技术,特别是涉及一种网络设备的Samba配置管理方法及系统。
背景技术
路由器一般均提供了samba服务,可以共享路由器中的存储文件。用户可以通过修改samba服务器的配置文件来设置共享,这些配置信息包括可以访问的用户、共享的目录以及读写权限等,一般的做法是设置一个共享目录,就在samba的配置文件里面加一条,删除一个共享目录,就在samba的配置文件里面把相映的那条信息删掉。在实际中,因为大多数路由器都是外接存储设备(例如U盘、tf卡等)会频繁的插拔,这样就造成了samba配置文件记录的共享目录路径和实际路径不匹配,造成用户无法访问。例如:开始路由器上面外接了一个U盘1,盘符是F盘,把F盘共享出去,配置文件记录的共享目录就是F盘;后续如果拔出了U盘1,插上另一个U盘2,这时U盘2的盘符就变成F盘,即使此时再把U盘1插上,U盘1的盘符将变成G盘。但配置文件记录的共享目录还是原来的F盘,这就会造成samba配置文件里面有大量的无效配置。
鉴于此,如何找到一种能够减少路由器Samba配置的无效配置的技术方案就成了本领域技术人员亟待解决的问题。
发明内容
鉴于以上所述现有技术的缺点,本发明的目的在于提供一种网络设备的Samba配置管理方法及系统,用于解决现有技术中由于网络设备外接存储设备的插拔导致Samba配置文件中出现无效配置的问题。
为实现上述目的及其他相关目的,本发明提供一种网络设备的Samba配置管理方法,所述网络设备的Samba配置管理方法包括:设置一个存储设备的共享目录时,将所述共享目录信息加入到Samba服务器的配置文件中,并将所述共享目录信息存储到所述存储设备的共享备份文件中;所述共享目录信息包括共享路径;当检测到存储设备拔出网络设备时,将所述 存储设备相关的共享目录信息从所述Samba服务器的配置文件中删除;当检测到存储设备插入网络设备时,逐条读取所述存储设备的共享备份文件中的共享目录信息,并作如下处理:获取所述共享目录信息的共享路径,将所述共享路径的盘符修改成所述存储设备的当前盘符,判断修改后的共享路径是否存在,如果存在,则将所述共享目录信息加入到Samba服务器的配置文件中;如果不存在,则在所述共享备份文件中删除所述共享目录信息。
可选地,所述共享备份文件存储于所述存储设备的根目录下。
可选地,所述网络设备的Samba配置管理方法还包括:删除一个存储设备的共享目录时,将所述共享目录信息从Samba服务器的配置文件中删除,并将所述共享目录信息从所述存储设备的共享备份文件中删除。
可选地,所述网络设备的Samba配置管理方法还包括:修改一个存储设备的共享目录时,在Samba服务器的配置文件中修改所述共享目录信息,并在所述存储设备的共享备份文件中修改所述共享目录信息。
可选地,所述网络设备包括路由器。
本发明提供一种网络设备的Samba配置管理系统,所述网络设备的Samba配置管理系统包括:共享信息管理模块,用于设置一个存储设备的共享目录时,将所述共享目录信息加入到Samba服务器的配置文件中,并将所述共享目录信息存储到所述存储设备的共享备份文件中;所述共享目录信息包括共享路径;设备拔出管理模块,用于当检测到存储设备拔出网络设备时,将所述存储设备相关的共享目录信息从所述Samba服务器的配置文件中删除;设备插入管理模块,用于当检测到存储设备插入网络设备时,逐条读取所述存储设备的共享备份文件中的共享目录信息,并作如下处理:获取所述共享目录信息的共享路径,将所述共享路径的盘符修改成所述存储设备的当前盘符,判断修改后的共享路径是否存在,如果存在,则将所述共享目录信息加入到Samba服务器的配置文件中;如果不存在,则在所述共享备份文件中删除所述共享目录信息。
可选地,所述共享备份文件存储于所述存储设备的根目录下。
可选地,所述共享备份文件的文件属性是隐藏文件。
可选地,所述共享信息管理模块还用于:删除一个存储设备的共享目录时,将所述共享目录信息从Samba服务器的配置文件中删除,并将所述共享目录信息从所述存储设备的共享备份文件中删除。
可选地,所述共享信息管理模块还用于:修改一个存储设备的共享目录时,在Samba服务器的配置文件中修改所述共享目录信息,并在所述存储设备的共享备份文件中修改所述共 享目录信息。
可选地,所述网络设备包括路由器。
如上所述,本发明的一种网络设备的Samba配置管理方法及系统,具有以下有益效果:通过在存储设备里备份配置信息,在重新插入路由器后,在把配置信息导入samba配置文件,从而解决因外接设备路径发生改变,造成共享失效的问题。
附图说明
图1显示为本发明的网络设备的Samba配置管理方法的一实施例的流程示意图。
图2显示为本发明的网络设备的Samba配置管理系统的一实施例的模块示意图。
元件标号说明
1                      网络设备的Samba配置管理系统
11                     共享信息管理模块
12                     设备拔出管理模块
13                     设备插入管理模块
S1~S3                 步骤
具体实施方式
以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。
需要说明的是,本实施例中所提供的图示仅以示意方式说明本发明的基本构想,遂图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。
本发明提供一种网络设备的Samba配置管理方法。Samba是一个工具套件,在Unix上实现SMB(Session Message Block)协议,或者称之为NETBIOS/LanManager协议。SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和打印机的一种通信协议,它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务。可以通过修改Samba的配置文件来设置共享,这些配置信息包括可以访问的用户、共享的目录以及读写权限等,一般的做法是设置一个共享目录,就在Samba的配置文件(smb.conf)里面加一条,删除一个共享 目录,就在Samba的配置文件里面把相映的那条信息删掉。本发明的方案能够通过在存储设备里备份配置信息,在重新插入网络设备后,在把配置信息导入samba配置文件,从而解决因外接设备路径发生改变,造成共享失效的问题。所述网络设备包括路由器。在一个实施例中,如图1所示,所述网络设备的Samba配置管理方法包括:
步骤S1,设置一个存储设备的共享目录时,将所述共享目录信息加入到Samba服务器的配置文件中,并将所述共享目录信息存储到所述存储设备的共享备份文件中;所述共享目录信息包括共享路径。所述共享目录信息是指所述共享目录的相关信息,可以包括共享路径,共享名称,可以访问的用户以及读写权限等。在一个实施例中,所述共享备份文件可以存储于所述存储设备的根目录下。所述共享备份文件的文件属性是隐藏文件。所述存储设备为外接存储设备,包括U盘、tf卡等。
步骤S2,当检测到存储设备拔出网络设备时,将所述存储设备相关的共享目录信息从所述Samba服务器的配置文件中删除。所述网络设备包括路由器。
步骤S3,当检测到存储设备插入网络设备时,逐条读取所述存储设备的共享备份文件中的共享目录信息,并作如下处理:获取所述共享目录信息的共享路径,将所述共享路径的盘符修改成所述存储设备的当前盘符,判断修改后的共享路径是否存在,如果存在,则将所述共享目录信息加入到Samba服务器的配置文件中;如果不存在,则在所述共享备份文件中删除所述共享目录信息。
在一个实施例中,所述网络设备的Samba配置管理方法还包括:删除一个存储设备的共享目录时,将所述共享目录信息从Samba服务器的配置文件中删除,并将所述共享目录信息从所述存储设备的共享备份文件中删除。在一个实施例中,所述网络设备的Samba配置管理方法还包括:修改一个存储设备的共享目录时,在Samba服务器的配置文件中修改所述共享目录信息,并在所述存储设备的共享备份文件中修改所述共享目录信息。在实际应用中,本发明的方法步骤S1、S2、S3可以根据需要随意选择执行,而不限于以上顺序。
在一个实施例中,所述网络设备为路由器。所述网络设备的Samba配置管理方法包括:1、设置共享目录:路由器共享某个设备的文件夹时,会修改samba服务器的配置文件smb.conf,并把该共享的相关信息(例如:共享路径,共享名称,可以访问的用户以及读写权限等)在该设备的根目录下做个备份,该备份文件属性是隐藏文件。在删除或修改共享时,同样的也修改设备根目录下的备份文件。2、插拔外接存储设备。包括:A:插入存储设备时,cpu判断存储设备是否有samba配置文件的备份,如果存在就读取备份的信息,判断共享路径里盘符是否是现在的盘符,如果错误就改成现在的盘符,再去检测共享路径是否存在,若不存在 就删除该条共享信息,否则加入samba服务器的配置文件smb.conf。B:拔出存储设备时,cpu检测到存储设备被拔出,然后清除所有和该设备有关的共享信息。
本发明提供一种网络设备的Samba配置管理系统。所述网络设备的Samba配置管理系统能够应用如上所述的网络设备的Samba配置管理方法。所述网络设备包括路由器。在一个实施例中,如图2所示,所述网络设备的Samba配置管理系统1包括共享信息管理模块11、设备拔出管理模块12、设备插入管理模块13。其中:
共享信息管理模块11用于设置一个存储设备的共享目录时,将所述共享目录信息加入到Samba服务器的配置文件中,并将所述共享目录信息存储到所述存储设备的共享备份文件中;所述共享目录信息包括共享路径。所述共享目录信息是指所述共享目录的相关信息,可以包括共享路径,共享名称,可以访问的用户以及读写权限等。在一个实施例中,所述共享备份文件可以存储于所述存储设备的根目录下。所述共享备份文件的文件属性是隐藏文件。在一个实施例中,所述共享信息管理模块11还用于:删除一个存储设备的共享目录时,将所述共享目录信息从Samba服务器的配置文件中删除,并将所述共享目录信息从所述存储设备的共享备份文件中删除。在一个实施例中,所述共享信息管理模块11还用于:修改一个存储设备的共享目录时,在Samba服务器的配置文件中修改所述共享目录信息,并在所述存储设备的共享备份文件中修改所述共享目录信息。所述存储设备为外接存储设备,包括U盘、tf卡等。
设备拔出管理模块12与共享信息管理模块11相连,用于当检测到存储设备拔出网络设备时,将所述存储设备相关的共享目录信息从所述Samba服务器的配置文件中删除。所述网络设备包括路由器。
设备插入管理模块13与共享信息管理模块11相连,用于当检测到存储设备插入网络设备时,逐条读取所述存储设备的共享备份文件中的共享目录信息,并作如下处理:获取所述共享目录信息的共享路径,将所述共享路径的盘符修改成所述存储设备的当前盘符,判断修改后的共享路径是否存在,如果存在,则将所述共享目录信息加入到Samba服务器的配置文件中;如果不存在,则在所述共享备份文件中删除所述共享目录信息。
综上所述,本发明的一种网络设备的Samba配置管理方法及系统通过在存储设备里备份配置信息,在重新插入路由器后,在把配置信息导入samba配置文件,从而解决因外接设备路径发生改变,造成共享失效的问题。所以,本发明有效克服了现有技术中的种种缺点而具高度产业利用价值。
上述实施例仅例示性说明本发明的原理及其功效,而非用于限制本发明。任何熟悉此技术的人士皆可在不违背本发明的精神及范畴下,对上述实施例进行修饰或改变。因此,举凡 所属技术领域中具有通常知识者在未脱离本发明所揭示的精神与技术思想下所完成的一切等效修饰或改变,仍应由本发明的权利要求所涵盖。

Claims (10)

  1. 一种网络设备的Samba配置管理方法,其特征在于,所述网络设备的Samba配置管理方法包括:
    设置一个存储设备的共享目录时,将所述共享目录信息加入到Samba服务器的配置文件中,并将所述共享目录信息存储到所述存储设备的共享备份文件中;所述共享目录信息包括共享路径;
    当检测到存储设备拔出网络设备时,将所述存储设备相关的共享目录信息从所述Samba服务器的配置文件中删除;
    当检测到存储设备插入网络设备时,逐条读取所述存储设备的共享备份文件中的共享目录信息,并作如下处理:获取所述共享目录信息的共享路径,将所述共享路径的盘符修改成所述存储设备的当前盘符,判断修改后的共享路径是否存在,如果存在,则将所述共享目录信息加入到Samba服务器的配置文件中;如果不存在,则在所述共享备份文件中删除所述共享目录信息。
  2. 根据权利要求1所述的网络设备的Samba配置管理方法,其特征在于:所述网络设备的Samba配置管理方法还包括:删除一个存储设备的共享目录时,将所述共享目录信息从Samba服务器的配置文件中删除,并将所述共享目录信息从所述存储设备的共享备份文件中删除。
  3. 根据权利要求1所述的网络设备的Samba配置管理方法,其特征在于:所述网络设备的Samba配置管理方法还包括:修改一个存储设备的共享目录时,在Samba服务器的配置文件中修改所述共享目录信息,并在所述存储设备的共享备份文件中修改所述共享目录信息。
  4. 根据权利要求1所述的网络设备的Samba配置管理方法,其特征在于:所述网络设备包括路由器。
  5. 一种网络设备的Samba配置管理系统,其特征在于:所述网络设备的Samba配置管理系统包括:
    共享信息管理模块,用于设置一个存储设备的共享目录时,将所述共享目录信息加入到Samba服务器的配置文件中,并将所述共享目录信息存储到所述存储设备的共享备份文件中;所述共享目录信息包括共享路径;
    设备拔出管理模块,用于当检测到存储设备拔出网络设备时,将所述存储设备相关的共享目录信息从所述Samba服务器的配置文件中删除;
    设备插入管理模块,用于当检测到存储设备插入网络设备时,逐条读取所述存储设备的共享备份文件中的共享目录信息,并作如下处理:获取所述共享目录信息的共享路径,将所述共享路径的盘符修改成所述存储设备的当前盘符,判断修改后的共享路径是否存在,如果存在,则将所述共享目录信息加入到Samba服务器的配置文件中;如果不存在,则在所述共享备份文件中删除所述共享目录信息。
  6. 根据权利要求5所述的网络设备的Samba配置管理系统,其特征在于:所述共享信息管理模块还用于:删除一个存储设备的共享目录时,将所述共享目录信息从Samba服务器的配置文件中删除,并将所述共享目录信息从所述存储设备的共享备份文件中删除。
  7. 根据权利要求5所述的网络设备的Samba配置管理系统,其特征在于:所述共享信息管理模块还用于:修改一个存储设备的共享目录时,在Samba服务器的配置文件中修改所述共享目录信息,并在所述存储设备的共享备份文件中修改所述共享目录信息。
  8. 根据权利要求5所述的网络设备的Samba配置管理系统,其特征在于:所述共享备份文件存储于所述存储设备的根目录下。
  9. 根据权利要求5所述的网络设备的Samba配置管理系统,其特征在于:所述共享备份文件的文件属性是隐藏文件。
  10. 根据权利要求5所述的网络设备的Samba配置管理系统,其特征在于:所述网络设备包括路由器。
PCT/CN2016/101400 2015-12-09 2016-09-30 一种网络设备的Samba配置管理方法及系统 WO2017097025A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/538,674 US20170371894A1 (en) 2015-12-09 2016-09-30 Samba configuration management method and system for network device
EP16872219.7A EP3229403B1 (en) 2015-12-09 2016-09-30 Samba configuration management method for network device and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510908147.5A CN105391587B (zh) 2015-12-09 2015-12-09 一种网络设备的Samba配置管理方法及系统
CN201510908147.5 2015-12-09

Publications (1)

Publication Number Publication Date
WO2017097025A1 true WO2017097025A1 (zh) 2017-06-15

Family

ID=55423439

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/101400 WO2017097025A1 (zh) 2015-12-09 2016-09-30 一种网络设备的Samba配置管理方法及系统

Country Status (4)

Country Link
US (1) US20170371894A1 (zh)
EP (1) EP3229403B1 (zh)
CN (1) CN105391587B (zh)
WO (1) WO2017097025A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391587B (zh) * 2015-12-09 2018-06-19 上海斐讯数据通信技术有限公司 一种网络设备的Samba配置管理方法及系统
CN106484553B (zh) * 2016-09-13 2019-06-28 天脉聚源(北京)传媒科技有限公司 一种解决samba故障的方法及装置
CN107181631A (zh) * 2017-07-26 2017-09-19 郑州云海信息技术有限公司 一种Samba集群中节点故障切换方法及系统
CN108881441B (zh) * 2018-06-21 2021-07-02 惠州高盛达科技有限公司 基于路由器的共享在线播放方法及其系统
CN111198830B (zh) * 2019-11-22 2021-08-10 广州视源电子科技股份有限公司 移动存储设备的识别方法、装置、电子设备以及存储介质
CN112422327B (zh) * 2020-11-02 2024-02-13 深圳Tcl新技术有限公司 基于wps的路由器配网方法、路由器及存储介质
CN113032829B (zh) * 2021-03-26 2022-06-10 山东英信计算机技术有限公司 多通道并发的文件权限管理方法、装置、服务器和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7721048B1 (en) * 2006-03-15 2010-05-18 Board Of Governors For Higher Education, State Of Rhode Island And Providence Plantations System and method for cache replacement
CN102122248A (zh) * 2011-01-21 2011-07-13 烽火通信科技股份有限公司 通信设备的线卡软件管理方法
CN104601724A (zh) * 2015-02-03 2015-05-06 北京金和软件股份有限公司 上传和下载文件的方法及系统
CN105117496A (zh) * 2015-09-28 2015-12-02 上海斐讯数据通信技术有限公司 一种共享路由器外部存储设备中数据的方法及系统
CN105391587A (zh) * 2015-12-09 2016-03-09 上海斐讯数据通信技术有限公司 一种网络设备的Samba配置管理方法及系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6578034B1 (en) * 1999-09-30 2003-06-10 International Business Machines Corporation Method and system for a distributed hidden database across a plurality of computer media
US20080016120A1 (en) * 2006-06-29 2008-01-17 Yosi Markovich System and method for case management
US7865504B2 (en) * 2006-07-10 2011-01-04 Simdesk Technologies, Inc. Native file to shared resource locator naming
US7865878B2 (en) * 2006-07-31 2011-01-04 Sap Ag Method and apparatus for operating enterprise software from a detachable storage device
CN103888527B (zh) * 2014-03-13 2017-11-07 小米科技有限责任公司 数据共享方法和装置
TW201541352A (zh) * 2014-04-29 2015-11-01 Ibm 系統管理控制器以及設定檔回復與備份的方法
CN105100901B (zh) * 2014-05-08 2018-07-13 Tcl集团股份有限公司 一种虚拟存储卡配置方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7721048B1 (en) * 2006-03-15 2010-05-18 Board Of Governors For Higher Education, State Of Rhode Island And Providence Plantations System and method for cache replacement
CN102122248A (zh) * 2011-01-21 2011-07-13 烽火通信科技股份有限公司 通信设备的线卡软件管理方法
CN104601724A (zh) * 2015-02-03 2015-05-06 北京金和软件股份有限公司 上传和下载文件的方法及系统
CN105117496A (zh) * 2015-09-28 2015-12-02 上海斐讯数据通信技术有限公司 一种共享路由器外部存储设备中数据的方法及系统
CN105391587A (zh) * 2015-12-09 2016-03-09 上海斐讯数据通信技术有限公司 一种网络设备的Samba配置管理方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3229403A4 *

Also Published As

Publication number Publication date
EP3229403A1 (en) 2017-10-11
EP3229403A4 (en) 2017-12-13
CN105391587B (zh) 2018-06-19
EP3229403B1 (en) 2019-01-02
CN105391587A (zh) 2016-03-09
US20170371894A1 (en) 2017-12-28

Similar Documents

Publication Publication Date Title
WO2017097025A1 (zh) 一种网络设备的Samba配置管理方法及系统
US10747724B2 (en) System and method of using data blocks to optimize file storage
US9336406B2 (en) Multiprotocol access control list with guaranteed protocol compliance
US8108445B2 (en) Maintaining and replicating chat histories
US20180152515A1 (en) File Storage Method and Apparatus for Instant Communication Messages
CN105740418A (zh) 一种基于文件监控和消息推送的实时同步系统
KR20120011332A (ko) 메타데이터 병합에 걸친 실행 취소 및 재실행 능력의 유지
US10521423B2 (en) Apparatus and methods for scanning data in a cloud storage service
US8615488B2 (en) Physical replication of database subset to improve availability and reduce resource cost in a cloud environment
CN102821111A (zh) 文件云存储实时同步方法
US10540325B2 (en) Method and device for identifying junk picture files
US20180239839A1 (en) Method and Apparatus for Identifying To-Be-Cleaned Data, and Electronic Device
CN104965835B (zh) 一种分布式文件系统的文件读写方法及装置
CN106293954A (zh) 一种基于分布式锁的高可用服务管理方法
CN111159100A (zh) 区块链文件存取方法、装置、计算机设备及存储介质
EP3000049B1 (en) System and method to provide document management on a public document system
JP2017531239A (ja) インタラクション情報におけるdoi(デジタルオブジェクト一意識別子)の処理メソッド及びその装置
US8447857B2 (en) Transforming HTTP requests into web services trust messages for security processing
WO2016000545A1 (zh) 图片类垃圾文件的识别方法、装置和电子设备
US20180121531A1 (en) Data Updating Method, Device, and Related System
CN103246729A (zh) 一种处理安卓移动端的多媒体文件的方法和系统
CN108133026B (zh) 一种多数据的处理方法、系统及存储介质
US20200210382A1 (en) System and method of deletion of files and counteracting their restoration
CN105095102A (zh) 一种快照卷自动扩容的方法及装置
US20140297953A1 (en) Removable Storage Device Identity and Configuration Information

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 15538674

Country of ref document: US

REEP Request for entry into the european phase

Ref document number: 2016872219

Country of ref document: EP

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16872219

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE