CN106649600B - A kind of method, apparatus and system of migrated file permission - Google Patents
A kind of method, apparatus and system of migrated file permission Download PDFInfo
- Publication number
- CN106649600B CN106649600B CN201611055336.3A CN201611055336A CN106649600B CN 106649600 B CN106649600 B CN 106649600B CN 201611055336 A CN201611055336 A CN 201611055336A CN 106649600 B CN106649600 B CN 106649600B
- Authority
- CN
- China
- Prior art keywords
- authority information
- file
- target device
- permission
- instruction
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/119—Details of migration of file systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
The embodiment of the present invention provides the method, apparatus and system of a kind of migrated file permission, for solving the problems, such as that the authority information before authority information and file migration after file migration is inconsistent.The method of the migrated file permission includes: the first authority information that migration server reads file by the first agreement from source device, and the first authority information is sent to by target device by the first agreement, the first authority information includes the file permission that the first agreement is supported;Migration server sends the instruction that locked authority is converted to target device;Migration server reads the second authority information of file by second protocol from source device, and the second authority information is sent to target device by second protocol, and the second authority information includes the file permission that second protocol is supported;Target device keeps the first authority information constant after receiving the second authority information, according to the instruction of locked authority conversion.
Description
Technical field
The present invention relates to field of computer technology, in particular to a kind of the method, apparatus and system of migrated file permission.
Background technique
Operating right of the authority information characterization different user of file to file in file system.Some file system are supported
The type of two kinds or more of agreement, the file permission that different agreement is supported is different, thus the file in file system can be with
Permission with two or more type.
When migrating file in file system from source device to target device, need together to move the authority information of file
Move to target device.The migration of authority information is needed by supporting the agreement of the authority information to carry out, and has the first power in file
When limit information and the second authority information, need by supporting the first agreement of the first authority information to believe the first permission of file
Breath is migrated to target device, and is set by supporting the second protocol of the second authority information to migrate the second authority information to target
It is standby.
The different types of authority information of file is successively migrated to target device, and target device is obtaining later migrate to mesh
After the authority information of marking device, it can be migrated to relatively early to the power of target device according to later migrate to the authority information of target device
Limit information is updated.For example, target device is migrated to later to the second permission of target device according to transformation rule between permission
Information is converted, the first authority information after being converted, and is migrated with the first authority information replacement after conversion is relatively early to target
First authority information of equipment.
But the information content that the different types of authority information of file is included may be different, and weigh between different vendor
The rule of limit conversion is also different, causes to be migrated to relatively early to target device according to later migrate to the authority information of target device
When authority information is updated, updated authority information with it is inconsistent compared with the early authority information migrated to target device, cause
The authority information before authority information and file migration after file migration is inconsistent.
Summary of the invention
The embodiment of the present invention provides the method, apparatus and system of a kind of migrated file permission, for solving file migration
The inconsistent problem of the authority information before authority information and file migration afterwards.
In a first aspect, the embodiment of the present invention provides a kind of method of migrated file permission, this method is used for migration server
First authority information of file in source device and the second authority information are migrated to target device, which can divide
It is not communicated by the first agreement and second protocol with source device and target device, the first authority information includes described
The file permission that one agreement is supported, the second authority information include the file permission that the second protocol is supported.This method includes such as
Lower step: firstly, migration server reads the first authority information of file by the first agreement from source device, and pass through described the
First authority information is sent to target device by one agreement;And migration server sends to the target device and locks
The instruction of permission transform, the instruction of the locked authority conversion are used to indicate the target device and are receiving the second of the file
When authority information, keep first authority information constant, second authority information includes the file power that second protocol is supported
Limit;Then, the migration server reads second permission of the file by the second protocol from the source device
Information, and second authority information is sent to by the target device by the second protocol;The target device is connecing
After receiving second authority information, keep first authority information constant according to the instruction of locked authority conversion.Its
In, migration server, which sends the instruction that locked authority is converted to the target device, to send the second permission earlier than to target device
Information can send the first authority information earlier than to target device, can also be later than to target device and send the first authority information.
In this implementation, migration server passes through the first agreement and second protocol respectively and believes the first permission of file
Breath and the second authority information are migrated from source device to target device, and the second authority information of rear migration is being sent to target
Before equipment, migration server sends the instruction that locked authority is converted to target device, and target device is moved upon receipt
When the second authority information moved, keeps the first authority information first migrated constant, avoid second that target device migrates after
Authority information is updated the authority information of file and source in caused target device 300 to the first authority information first migrated
The inconsistent problem of the authority information of file in equipment, the authority information for realizing migration front and back file are consistent.
In an optional implementation manner, after the target device receives second authority information, save this second
Authority information, Xiang Suoshu migration server sending permission migrate success response;The migration server is moved in the reception permission
After moving success response, Xiang Suoshu target device sends the instruction for releasing permission transform locking, the releasing permission transform locking
Instruction is used to indicate the target device when receiving second authority information of the file, is believed according to second permission
It ceases and first authority information of the file is updated.In this implementation, migration server is in the first power for determining file
Limit information and the second authority information send to target device after source device Successful migration to target device and release permission transform
The instruction of locking, so that after second authority information of the user to file in target device is updated, target device being capable of root
Corresponding update is carried out according to first authority information of updated second authority information to the file of preservation, guarantees target device Chinese
First authority information of part is synchronous with the user right holding that the second authority information is characterized.
In an optional implementation manner, the migration server is believed first permission by first agreement
When breath is sent to target device, the data of the file are given to the target device together.This implementation can be realized simultaneously
The authority information of the data of file and file is migrated to the efficiency that file migration is improved to target device from source device.
In an optional implementation manner, the migration server is read by first agreement from the source device
When first authority information, the instruction that state locks is sent to the source device together, the instruction of the state locking is used for
Indicate the source device refusal to the data of the file, first authority information of the file and the institute of the file
State the update operation of the second authority information.This implementation can read the first permission of file in migration server from source device
After information, the data of file, the first authority information of file and the second authority information are constant in holding source device, avoid moving
During shifting server migrates the authority information of the data of file or file to target device from source device, source device Chinese
The authority information of the data of part or file occur after migration caused by change in source device and target device the data of file or
The inconsistent situation of the authority information of file.
In an optional implementation manner, the migration server by the second protocol by second permission
After information is sent to the target device, Xiang Suoshu source device sends the instruction of releasing state locking, the releasing state locking
Instruction be used to indicate the source device and receive first authority information and the file to the file, the file
Second authority information update operation.This implementation can be migrated by the authority information of file to target device
Afterwards, the state locking for releasing the authority information of file and file in source device, allows users to the data or text to file
The authority information of part is updated operation.
In an optional implementation manner, the migration server is read by the second protocol from the source device
When second authority information, the data of the file are read from the source device together;The migration server passes through described
When second authority information is sent to target device by second protocol, the data of the file are set to the target together
It is standby;The target device receives the file, and judges whether to have stored the file, if so, the file is not saved, it is no
Then, the file is saved.In this implementation, migration server can be after the data of file be modified in source device, will more
Change the Data Migration of rear file to target device, guarantees that the data of file and the authority information of file are set with source in target device
It is consistent in standby.
In an optional implementation manner, the first agreement can be server information block (Server Message
Block, SMB) agreement, accesses control list that the first authority information is supported by SMB agreement (Access Control List,
ACL) information;Second protocol can be Network File System (Network File System, NFS) agreement, the second authority information
For mode (Mode) information controlled for permission.Alternatively, the first agreement is NFS protocol, the first authority information is for permission
The Mode information of control, second protocol are SMB agreement, and the second authority information is ACL information.
Second aspect, the embodiment of the present invention provide the device of migrated file permission, the device for realizing first aspect or
The function of migration server in any possible realization of first aspect.Specifically, the device includes for executing above-mentioned first
The module of step is executed in method in any possible realization of aspect or first aspect by migration server.
The third aspect, the embodiment of the present invention provide the device of migrated file permission, the device for realizing first aspect or
The function of migration server in any possible realization of first aspect.Specifically, the device includes for executing above-mentioned first
The module of step is executed in method in any possible realization of aspect or first aspect by target device.
Fourth aspect, the embodiment of the present invention provide a kind of migration server, for realizing first aspect or first aspect
The function of migration server in any possible realization.Specifically, migration server connects including the first communication interface, the second communication
Mouth and processor;First communication interface is used for source device and target device with the first protocol communication;Described second is logical
Interface is believed, for communicating with source device and target device with second protocol;The processor, is used for: being connect by the first communication
Mouth and the second communication interface execute in the method in any possible realization of above-mentioned first aspect or first aspect by migrating
Server executes step.
5th aspect, the embodiment of the present invention provide a kind of calculating equipment, for realizing times of first aspect or first aspect
It anticipates the function of target device in possible realization.Specifically, calculating equipment includes that processor, memory and the third communication connect
Mouth, fourth communication interface;The third communication interface, is used for and migration server is with the first protocol communication;The fourth communication
Interface, for being communicated with the migration server with second protocol;The processor, is used for: passing through the third communication interface
And the fourth communication interface executes in the method in any possible realization of above-mentioned first aspect or first aspect by mesh
Marking device executes step.
6th aspect, the embodiment of the present invention provide a kind of system of migrated file permission, the system include migration server,
Source device and target device, wherein source device is for the first authority information of storage file and the second permission letter of file
Breath;Migration server is used to execute in the method in any possible realization of above-mentioned first aspect or first aspect and be taken by migration
The step of business device executes, target device is used to execute the method in any possible realization of above-mentioned first aspect or first aspect
In the step of being executed by target device, and then realize and move the first authority information of file in source device and the second authority information
Move to target device.
7th aspect, the embodiment of the present invention provides a kind of computer-readable medium, for storing computer program, the calculating
Machine program includes the instruction for executing the method in any possible realization of first aspect or first aspect.
The present invention can also be further combined more real to provide on the basis of the realization that above-mentioned various aspects provide
It is existing.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly introduced.
Fig. 1 is the schematic diagram of file migratory system in the embodiment of the present invention;
Fig. 2 is the structural schematic diagram of migration server in the embodiment of the present invention;
Fig. 3 is the structural schematic diagram of target device in the embodiment of the present invention;
Fig. 4 is the flow diagram of migrated file authority method in the embodiment of the present invention;
Fig. 5 is the further refinement flow diagram of migrated file authority method in the embodiment of the present invention;
Fig. 6 is the structural schematic diagram of device 500 in the embodiment of the present invention;
Fig. 7 is the structural schematic diagram of device 600 in the embodiment of the present invention.
Specific embodiment
In general, source device and target device are the equipment of different vendor, it is difficult to directly carry out text between different vendor's equipment
The migration of part and file permission information, the mark for needing third-party migration server to support by source device and target device
The migration of file and file permission information between quasi- protocol realization source device and target device.Specifically, migration server from
Source device reads the authority information of file and file, then sets the authority information of the file of reading and file write-in target
It is standby.
In the prior art, it generallys use under type such as and carries out the migration of file permission information:
Mode 1, when file system supports different types of first authority information and the second authority information, migration service
Device is by supporting the first agreement of the first authority information to migrate the first authority information to target device, then, source from source device
Equipment obtains the second authority information to the first authority information conversion that migration obtains.
Mode 2, migration server, which first passes through, supports the first agreement of the first authority information to set the first authority information from source
It is standby to migrate to target device, then by supporting the second protocol of the second authority information to migrate the second authority information from source device
It, still, can be according to the second authority information to first moving after the second authority information that target device migrates after acquisition to target device
The first authority information moved is updated, this is because target device can default a type of permission of file based on the received
Information is updated the other kinds of authority information of file, so that the user's operation that all kinds of authority informations of file characterize
Permission is consistent.Therefore, mode 2 is substantially identical as mode 1, and the authority information to migrate after realizes permission migration.
However, the information content that the different types of authority information of file is included may be different, and weighed between different vendor
The rule of limit conversion is also different, causes in above two migration permission mode, the permission before authority information and migration after migration
Information is inconsistent.
For example, the first authority information of file is A1, the second authority information of file is B, the second authority information B by B1 with
And B2 composition, wherein according to the transformation rule between the first authority information and the second authority information, A1 can be converted to B1, and B1 can
To be converted to A1, therefore, the information content of the information content of the first permission less than the second permission.Migration server is by the first authority information
A1 is migrated from source device to target device, and target device converts the first authority information A1 according to permission transform rule, raw
At the second authority information B1, using the second authority information B1 of generation as the file permission information saved in target device.It can
See, the second authority information B1 that target device saves occurs information compared to the second authority information B saved in source device and loses.
In another example the transformation rule in source device and target device between the first authority information and the second authority information not
Meanwhile user is updated the second authority information of file in source device, forms authority information B, source device is according to the first power
Transformation rule 1 between limit information and the second authority information converts authority information B, authority information A1 is generated, by the power
Limit information A1 is as the first new authority information.Then, migration server migrates authority information B to target device, and target is set
It is standby that authority information B is converted according to the transformation rule 2 between the first authority information and the second authority information, generate permission letter
A2 is ceased, using authority information A2 as the first new authority information.As it can be seen that in authority information and source device in target device
Authority information is inconsistent.
In order to solve the letter of the permission before the authority information and file migration after above-mentioned file migration existing in the prior art
Inconsistent problem is ceased, the embodiment of the present invention provides the method, apparatus and system of a kind of file permission migration.Below by attached
Figure and specific embodiment are described in detail technical solution of the embodiment of the present invention.
Fig. 1 is the schematic diagram of file migratory system in the embodiment of the present invention, which includes that migration server 100, source are set
Standby 200 and target device 300, migration server 100, source device 200 and target device 300 all can be various types of
Calculate equipment, such as computer, tablet computer, smart phone.Migration server 100, source device 200 and target device 300
It is common to support at least two communication protocols, supported jointly with three for ease of description, in the embodiment of the present invention the first agreement with
And the method for migrated file permission is explained for second protocol, wherein the first agreement supports the first power of transmission file
Limit information, second protocol support the second authority information of transmission file.
Wherein, source device 200 is for the first authority information of storage file and the second authority information of file, this first
Authority information includes the file permission that the first agreement is supported, which includes the file permission that second protocol is supported;
Migration server 100 is used for: reading the first authority information of file, Yi Jitong from source device by first agreement
It crosses first agreement and first authority information is sent to target device;
Target device 300 is used for: first authority information that migration server 100 is sent is received by first agreement,
And save first authority information;
Migration server 100 is also used to: sending the instruction that locked authority is converted to target device 300, which turns
The instruction changed is used to indicate target device 300 when receiving second authority information of this document, keeps first authority information not
Become;
Target device 300 is also used to: receiving the instruction of locked authority conversion;
Migration server 100 is also used to: being believed by the second protocol from second permission that source device 200 reads this document
Breath, and second authority information is sent to by target device 300 by the second protocol;
Target device 300 is also used to: receiving second authority information, and keeping according to the instruction of locked authority conversion should
First authority information is constant.
In above-mentioned file migration system, migration server 100 passes through the first agreement and second protocol for file respectively
First authority information and the second authority information are migrated from source device 200 to target device 300, and are weighed by the second of rear migration
Limit information is sent to before target device 300, and migration server 100 sends the instruction that locked authority is converted to target device 300,
When the second authority information that target device 300 migrates upon receipt, keeps the first authority information first migrated constant, keep away
Exempt from the second authority information that target device 300 migrates after and is updated caused mesh to the first authority information first migrated
The authority information of the file problem inconsistent with the authority information of file in source device 200 in marking device 300, before realizing migration
The authority information of file is consistent afterwards.
Optionally, in file migration system, target device 300 is also used to: saving second authority information, and to migration
100 sending permission of server migrates success response;
Migration server 100 is also used to: being received permission migration success response, is sent to target device 300 and release permission
Convert the instruction of locking, the instruction of releasing permission transform locking be used to indicate target device 300 reception this document this
When two authority informations, updated according to first authority information of second authority information to this document.
Since migration server is successfully moved in the first authority information and the second authority information for determining file from source device
After moving to target device, the instruction for releasing permission transform and locking is sent to target device, so as to Chinese to target device in user
After second authority information of part is updated, target device can be according to updated second authority information to the file of preservation
First authority information carries out corresponding update, guarantees that the first authority information of file in target device is characterized with the second authority information
User right keep synchronize.
Referring to Fig.1 and Fig. 2, migration server 100 include processor 110, memory 120, the first communication interface 130 with
And second communication interface 140.
Wherein, the first communication interface 130 is used to be based on the first protocol communication with source device 200 and target device 300;The
Two communication interfaces 140 are used to be based on second protocol with source device and target device to communicate.Specifically, the first communication interface 130
With the fifth communication interface 230 in source device 200 be based on the first protocol communication, and with the third communication in target device 300
Interface 330 is based on the first protocol communication;Second communication interface 140 is based on second with the 6th communication interface 240 in source device 200
Protocol communication, and the first protocol communication is based on the fourth communication interface 340 in target device 300.
Memory 120 is used for data, file permission information and the instruction of storage file;Processor 110 is deposited for executing
Instruction in reservoir 120, to execute following steps in the instruction of execution:
Read the first authority information of file from source device 200 with the first agreement by the first communication interface 130, and,
First authority information of file is sent to by target device 300 with the first agreement by the first communication interface 130;And pass through
Second communication interface 140 reads the second authority information of file with second protocol from source device 200, and, pass through the second communication
Second authority information of file is sent to target device 300 with second protocol by interface 140;And it is connect by the second communication
Before second authority information of file is sent to target device 300 with second protocol by mouth 140, pass through the first communication interface 130
Or second communication interface 140 to target device 300 send locked authority convert instruction, the locked authority conversion instruction be used for
Target device 300 keeps the first authority information of file constant when receiving the second authority information of file.
Optionally, the first communication interface 130 is also used to any in the second communication interface 140: being received target device 300 and is sent out
The permission migration success response sent, the permission migrate success response by the processor 310 of target device 300 in target device 300
It is generated after saving second authority information;
Processor 110 is also used to: generating the instruction for releasing permission transform locking, the instruction for releasing permission transform locking is used for
Target device when receiving the second authority information of file, according to the second authority information to the first authority information of file more
Newly;And the instruction that the releasing permission transform locks is sent to by mesh by the first communication interface 130 or the second communication interface 140
Marking device 300.
Optionally, processor 110 is also used to: generating the instruction of state locking, the instruction of state locking is used to indicate source and sets
The update operation of standby the second authority information for refusing the data of absolute file, the first authority information of file and file;And pass through
The instruction that the state locks is sent to source device 200 by the first communication interface 130 or the second communication interface 140.Wherein, migration clothes
Business device 100, which sends the instruction that the state locks to source device 200, can read the first authority information earlier than from source device 200, or
Person sends the instruction of state locking when sending the request for reading the first authority information to source device 200 together.
Optionally, processor 110 is also used to: being sent out the second authority information by second protocol in the second communication interface 140
After giving target device 300, the instruction of releasing state locking is generated, the instruction of releasing state locking is used to indicate source device receiving
The update of second authority information of the first authority information and file to file, file operates;And pass through the first communication interface
130 or second communication interface 140 instruction that the releasing state locks is sent to source device 200.
Please refer to Fig. 1 and Fig. 3, target device 300 include processor 310, memory 320, third communication interface 330 with
And fourth communication interface 340.
Wherein, third communication interface 330 is used to be based on the first protocol communication with migration server 100;Fourth communication interface
340 communicate for being based on second protocol with migration server 100.
Memory 320 is used for data, file permission information and the instruction of storage file;Processor 310 is deposited for executing
Instruction in reservoir 320, in the instruction of execution by third communication interface 330 from the received file of migration server 100
First authority information is stored among memory 320;And by fourth communication interface 340 from the received text of migration server 100
Second authority information of part is stored among memory 320;And respond third communication interface 330 or fourth communication interface 340
The instruction converted from the received locked authority of migration server 100, is being stored in memory 320 for the second authority information of file
Among when, keep the first authority information of file constant, the locked authority conversion instruction by migration server 100 processor
110 generations and target device 300 receive the instruction of locked authority conversion before receiving the second authority information.
Optionally, processor 310 is also used to: after the second authority information of file is stored in memory 320, generating permission
Migrate success response;And permission migration success response is sent to by third communication interface 330 or fourth communication interface 340
Migration server 100;
It is any in third communication interface 330 or fourth communication interface 340 to be also used to: to receive and release from migration server 100
The instruction of the instruction of permission transform locking, releasing permission transform locking is generated by the processor 110 of migration server 100, is used
In indicating processor 310 when target device 300 receives the second authority information of file, according to the second authority information to file
First authority information updates.
Please refer to Fig. 1, in the embodiment of the present invention, source device 200 includes processor 210, memory 220, fifth communication
Interface 230 and the 6th communication interface 240.Those of ordinary skill in the art can be according to the realization side of above-mentioned target device 300
Formula determines the implementation of source device 200, to avoid repeating, is no longer described in detail herein to the implementation of source device 200.
It should be noted that above-mentioned processor 110, processor 210 and processor 310 can be a processing element,
Or the general designation of multiple processing elements.Above-mentioned processor can be central processing unit (Central Processing
Unit, CPU), be also possible to specific integrated circuit (Application Specific Intergrated Circuit,
ASIC), or it is arranged to implement one or more integrated circuits of the embodiment of the present invention, such as: one or more micro- places
It manages device (Digital Singnal Processor, DSP), or, one or more field programmable gate array (Field
Programmable Gate Array, FPGA).
Memory 120, memory 220 and memory 320 can be a memory element, be also possible to multiple storage members
The general designation of part.Above-mentioned memory may include random access memory (Random-Access Memory, RAM), also may include non-
Volatile memory (Non-Volatile Memory, NVM), such as magnetic disk storage, flash memory (Flash) etc..
First communication interface 130 and the second communication interface 140 can integrate among the same communication unit, can also divide
Do not belong to two independent communication units.Similarly, fifth communication interface 230 can integrate with the 6th communication interface 240 same
Among a communication unit, two independent communication units can also be belonging respectively to.Third communication interface 330 and fourth communication interface
340 can integrate among the same communication unit, can also be belonging respectively to two independent communication units.
The embodiment of the present invention also provides a kind of migrated file authority method, in the present embodiment migration server, source device with
And the realization of target device is referred to Fig. 1 to Fig. 3.Fig. 4 is the flow diagram of the migrated file authority method, this method packet
Include following steps:
Step 401: migration server reads the first authority information of file, the first permission by the first agreement from source device
Information includes the file permission that the first agreement is supported.
Step 402: the first authority information is sent to target device by the first agreement by migration server.
Step 403: target device saves the first authority information.
Step 404: migration server sends the instruction that locked authority is converted, the instruction of locked authority conversion to target device
Target device is used to indicate when receiving the second authority information of file, keeps the first authority information constant, the second permission includes
The file permission that second protocol is supported.
Wherein, migration server can send the instruction that locked authority is converted to target device by the first agreement, can also
To send the instruction that locked authority is converted to target device by second protocol, alternatively, migration server passes through the first agreement, the
Other agreements except two agreements send the instruction that locked authority is converted to target device.
Step 405: migration server reads the second authority information of file by second protocol from source device.
Step 406: the second authority information is sent to target device by second protocol by migration server.
Step 407: target device saves the second authority information, and keeps the first permission according to the instruction of locked authority conversion
Information invariability.
It should be noted that step 404 executes before step 406, but itself and step 401, step 402, step are not limited
Sequencing between rapid 403 and step 405, as step 404 can be in step 401, step 402, step 403, step 405
And executed before either step in step 406, can also in step 401, step 402, step 403, step 405 any step
It is executed after rapid and before step 406.In addition, the file in the embodiment of the present invention is not limited to a file, or
Two or more files.
For above-mentioned steps 401 into the technical solution of step 407, migration server first passes through the first agreement for the first of file
Authority information is migrated from source device to target device, then is migrated the second authority information of file from source device by second protocol
To target device.Since migration server is being migrated the second authority information of file to target from source device by second protocol
Equipment sends the instruction that locked authority is converted to target device, and therefore, target device, will not when receiving the second authority information
It is updated according to first authority information of second authority information to the file saved, in this way, the file in target device
First authority information is consistent with the first authority information of file in source device, the second authority information of file and source in target device
The second authority information of file is consistent in equipment, and the authority information for realizing migration front and back file is consistent.
Optionally, in the embodiment of the present invention, the first agreement can be server information block (Server Message
Block, SMB) agreement, accesses control list that the first authority information is supported by SMB agreement (Access Control List,
ACL) information;Second protocol can be Network File System (Network File System, NFS) agreement, the second authority information
For mode (Mode) information controlled for permission.Alternatively, the first agreement is NFS protocol, the first authority information is for permission
The Mode information of control, second protocol are SMB agreement, and the second authority information is ACL information.
Migration server reads the side of the authority information of file and file by SMB agreement, NFS protocol from source device
Formula, and asked the implementation that the authority information of file and file is sent to target device by SMB agreement, NFS protocol
Referring to various technological means in the prior art, the embodiment of the present invention is not described in detail.
Optionally, further include following steps after step 407 referring to figure 5. in the embodiment of the present invention:
Step 408: target device migrates success response to migration server sending permission.
Step 409: migration server receives permission and migrates success response, sends to target device and releases permission transform locking
Instruction, release permission transform locking instruction be used to indicate target device reception file the second authority information when, according to
Second authority information updates the first authority information of file.
Migration server determines that the permission of file migrates successfully, sets to target after receiving permission migration success response
Preparation send the instruction for releasing permission transform locking, to be updated in second authority information of the user to file in target device
Afterwards, target device can carry out corresponding to more according to the first authority information of updated second authority information to the file of preservation
Newly, guarantee that the first authority information of file in target device is synchronous with the user right holding that the second authority information is characterized.
Optionally, in the embodiment of the present invention, the instruction of locked authority conversion is also used to target device and is receiving text
When the first authority information of part, keep the second authority information of file constant;The instruction of releasing permission transform locking is also used to
Target device when receiving the first authority information of file, according to the first authority information to the second authority information of file more
Newly.
Optionally, in the embodiment of the present invention, the first authority information is sent to target by the first agreement by migration server
When equipment, by the data of file to target device.Wherein, migration server can read the from source device by the first agreement
When one authority information, the data of file are read from source device.
Alternatively, when the second authority information is sent to target device by second protocol by migration server, by the number of file
According to target device.Wherein, migration server can be when reading the second authority information from source device by second protocol, from source
The data of equipment reading file.
This implementation can be realized while migrate the authority information of the data of file and file to mesh from source device
Marking device improves the efficiency of file migration.
Optionally, in the embodiment of the present invention, please continue to refer to Fig. 5, migrated file authority method further includes following steps:
Step 410: migration server sends the instruction that state locks to source device, and the instruction of state locking is used to indicate source
Equipment refuses the update operation of the second authority information of absolute file, the first authority information of file and file.
Step 410 can execute before step 401, alternatively, executing step 401, migration server passes through the first association
When discussing the request for the first permission for sending acquisition file to source device, the instruction that the state locks is sent to source device together.
This implementation can keep file in migration server after the first authority information that source device reads file
Data, the first authority information of file and the second authority information are constant, avoid data or text in migration server by file
During the authority information of part is migrated from source device to target device, the authority information of the data of file or file in source device
The source device feelings inconsistent with the data of file in target device or the authority information of file after migration caused by generation change
Shape.
Optionally, further include following steps after step 405 in conjunction with the scheme of step 410 in the embodiment of the present invention:
Step 411: migration server sends the instruction that releasing state locks to source device, and the instruction for releasing state locking is used
Receive the update to the second authority information of the first authority information and file of file, file in instruction source device to operate.
It should be noted that step 411 restriction executes after step 405, but it is not limited and is executed after step 405
Other steps between sequencing can also be held after step 409 if step 411 can execute before step 406
Row.
This implementation can be migrated by the authority information of file to target device, release source device in file and
The state of the authority information of file locks, and allows users to be updated behaviour to the data of file or the authority information of file
Make.
In another optional implementation of the embodiment of the present invention, in step 401, migration server passes through the first agreement from source
After equipment reads the first authority information of file, user can be updated operation to the file in source device;
In step 405, when migration server reads the second authority information from source device by second protocol, read from source device
Take the data of file;
In step 406, when the second authority information is sent to target device by second protocol by migration server, by file
Data to target device;
Target device judges whether the data for having saved this document after the data for receiving file, if saved,
Give up the data of received this document, if do not saved, saves the data of this document.Wherein, target device is to save to receive
This document data, including two kinds of situations: first, without saving this document in target device;Second, although target device is
The data of this document are saved, but the data of the file saved and the data of received file are inconsistent.
In this implementation, migration server can be after the data of file be modified in source device, by file after change
Data Migration to target device, guarantee in target device one in the data of file and the authority information of file and source device
It causes.
Fig. 6 is a kind of schematic diagram of the device 500 of migrated file permission provided in an embodiment of the present invention, which makees
For migration server, for migrating the first authority information of file in source device and the second authority information to target device.
Device 500 includes:
First read module 501, for reading the first authority information of file, the first power from source device by the first agreement
Limit information includes the file permission that the first agreement is supported;
First sending module 502, for the first authority information to be sent to target device by the first agreement;
Second sending module 503, for sending the instruction that locked authority is converted, the finger of locked authority conversion to target device
It enables and is used to indicate target device when receiving the second authority information of file, keep the first authority information constant, the second permission letter
Breath includes the file permission that second protocol is supported;
Second read module 504, for reading the second authority information of file from source device by second protocol;
Third sending module 505, for the second authority information to be sent to target device by second protocol.
Optionally, in the embodiment of the present invention, device 500 further include:
First receiving module 506, the permission for receiving target device transmission migrate success response;
4th sending module 507 releases permission transform for sending the instruction for releasing permission transform and locking to target device
The instruction of locking is used to indicate target device when receiving the second authority information of file, according to the second authority information to file
First authority information updates.
Optionally, in the embodiment of the present invention, the first sending module 502 is also used to: by the first agreement by the data of file
To target device.
Optionally, in the embodiment of the present invention, device 500 further include:
5th sending module 508, for reading the first permission letter from source device by the first agreement in the first read module
When breath, to source device send state lock instruction, state locking instruction be used to indicate source device refuse absolute file data,
The update of second authority information of the first authority information and file of file operates.
Optionally, in the embodiment of the present invention, device 500 further include:
6th sending module 509, for the second authority information to be sent to mesh by second protocol in third sending module
After marking device, the instruction that releasing state locks is sent to source device, the instruction of releasing state locking is used to indicate source device receiving
The update of second authority information of the first authority information and file to file, file operates.
The realization of each module is referred in Fig. 4 and Fig. 5 each step as performed by migration server in above-mentioned apparatus 500
Rapid implementation.
Fig. 7 is the device 600 of migrated file permission provided in an embodiment of the present invention, and device 600 is used as target device, is used for
The first authority information and the second authority information of the file migrated from source device are received from migration server.Device 600 includes:
First receiving module 601, for the first authority information of file to be received from migration server by the first agreement, the
One authority information includes the file permission that the first agreement is supported;
Second receiving module 602, the instruction of the locked authority conversion for receiving migration server transmission, locked authority turn
The instruction changed is used to indicate device when receiving the second authority information of file, keeps the first authority information constant, the second permission
Information includes the file permission that second protocol is supported;
Third receiving module 603, for receiving the second authority information of file from migration server by second protocol;
Respond module 604 is instructed, for turning after third receiving module receives the second authority information according to locked authority
The instruction changed keeps the first authority information constant.
Optionally, in the embodiment of the present invention, device 600 further include:
Sending module 605 is used for after third receiving module receives the second authority information, to migration server sending permission
Migrate success response;
4th receiving module 606 releases power for receiving the instruction for releasing permission transform locking of migration server transmission
The instruction of limit conversion locking is used to indicate device when receiving the second authority information of file, according to the second authority information to file
The first authority information update.
The realization of each module is referred in Fig. 4 and Fig. 5 each step as performed by target device in above-mentioned apparatus 600
Implementation.
The embodiment of the present invention also provides a kind of computer-readable medium, for storing computer program, the computer program
Including the instruction for executing the corresponding file permission moving method of Fig. 4 and Fig. 5.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, system or calculate
Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and
The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can
With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code
The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, equipment (system) and computer program product
Flowchart and/or the block diagram describe.It should be understood that can be by the instruction implementation flow chart and/or block diagram of computer program
Each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these meters
General purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices are arrived in the instruction of calculation machine program
Processor is to generate a machine, so that the instruction executed by computer or the processor of other programmable data processing devices
It generates for realizing the function specified in one or more flows of the flowchart and/or one or more blocks of the block diagram
The device of energy.
Obviously, those skilled in the art can carry out various modification and variations without departing from this hair to the embodiment of the present invention
The spirit and scope of bright embodiment.In this way, if these modifications and variations of the embodiment of the present invention belong to power of the embodiment of the present invention
Within the scope of benefit requirement and its equivalent technologies, then the embodiment of the present invention is also intended to include these modifications and variations.
Claims (15)
1. a kind of method of migrated file permission, which is characterized in that the described method includes:
Migration server reads the first authority information of file by the first agreement from source device, and the first authority information includes described
The file permission that first agreement is supported;
First authority information is sent to target device by first agreement by the migration server;
The migration server sends the instruction that locked authority is converted, the instruction of the locked authority conversion to the target device
The target device is used to indicate when receiving the second authority information of the file, keeps first authority information constant,
Second authority information includes the file permission that second protocol is supported;
The migration server reads second authority information of the file by the second protocol from the source device,
And second authority information is sent to by the target device by the second protocol;
The target device is after receiving second authority information, according to the instruction holding that the locked authority is converted
First authority information is constant.
2. the method according to claim 1, wherein further include:
The target device saves second authority information, and Xiang Suoshu migration server sending permission migrates success response;
The migration server receives the permission and migrates success response, and Xiang Suoshu target device, which is sent, releases permission transform locking
Instruction, the instruction for releasing permission transform locking is used to indicate the target device described the second of the reception file
When authority information, updated according to first authority information of second authority information to the file.
3. method according to claim 1 or 2, which is characterized in that further include:
When first authority information is sent to target device by first agreement by the migration server, by the text
The data of part give the target device.
4. according to the method described in claim 3, it is characterized by further comprising:
When the migration server reads first authority information from the source device by first agreement, the source Xiang Suoshu
Equipment sends the instruction of state locking, and the instruction of the state locking is used to indicate the source device refusal to the number of the file
According to the update operation of, first authority information of the file and second authority information of the file.
5. according to the method described in claim 4, it is characterized by further comprising:
The migration server after second authority information is sent to the target device by the second protocol, to
The source device sends the instruction of releasing state locking, and the instruction of the releasing state locking is used to indicate the source device and receives
The update of second authority information of first authority information and the file to the file, the file is grasped
Make.
6. the method according to requiring any one of 1 to 5, which is characterized in that first agreement is server information block SMB
One in agreement, Network File System NFS protocol, the second protocol is another;It is SMB association in first agreement
When view, the second protocol are NFS protocol, first authority information is access control list ACL information, second permission
Information is the mode Mode information controlled for permission;First agreement be NFS protocol, the second protocol be SMB association
When view, first authority information is the Mode information controlled for permission, and second authority information is ACL information.
7. a kind of device of migrated file permission characterized by comprising
First read module, for reading the first authority information of file, the first authority information from source device by the first agreement
The file permission supported including first agreement;
First sending module, for first authority information to be sent to target device by first agreement;
Second sending module, for sending the instruction that locked authority is converted to the target device, the locked authority conversion
Instruction is used to indicate the target device when receiving the second authority information of the file, keeps first authority information not
Become, second authority information includes the file permission that second protocol is supported;
Second read module, for being believed by the second protocol from second permission that the source device reads the file
Breath;
Third sending module, for second authority information to be sent to the target device by the second protocol.
8. device according to claim 7, which is characterized in that further include:
First receiving module migrates success response for receiving the permission that the target device is sent;
4th sending module, for sending the instruction for releasing permission transform and locking to the target device, the releasing permission turns
The instruction for changing locking is used to indicate the target device when receiving second authority information of the file, according to described the
Two authority informations update first authority information of the file.
9. device according to claim 7 or 8, which is characterized in that
First sending module is also used to: giving the data of the file to the target device by first agreement.
10. device according to claim 9, which is characterized in that further include:
5th sending module, in first read module by first agreement from source device reading described the
When one authority information, Xiang Suoshu source device sends the instruction of state locking, and the instruction of the state locking is used to indicate the source
Equipment refuses second permission to the data of the file, first authority information of the file and the file
The update of information operates.
11. device according to claim 10, which is characterized in that further include:
6th sending module, for being sent second authority information by the second protocol in the third sending module
After the target device, Xiang Suoshu source device sends the instruction of releasing state locking, and the instruction of the releasing state locking is used
In indicating that the source device receives described the to first authority information of the file, the file and the file
The update of two authority informations operates.
12. a kind of device of migrated file permission characterized by comprising
First receiving module, the first authority information for passing through the first agreement from migration server reception file, described first
Authority information includes the file permission that first agreement is supported;
Second receiving module, for receiving the instruction for the locked authority conversion that the migration server is sent, the locked authority
The instruction of conversion is used to indicate described device when receiving the second authority information of the file, keeps first authority information
Constant, second authority information includes the file permission that second protocol is supported;
Third receiving module, for receiving second power of the file from the migration server by the second protocol
Limit information;
Respond module is instructed, is used for after the third receiving module receives second authority information, according to the locking
The instruction of permission transform keeps first authority information constant.
13. device according to claim 12, which is characterized in that further include:
Sending module, for after the third receiving module receives second authority information, Xiang Suoshu migration server to be sent out
Permission is sent to migrate success response;
4th receiving module, the instruction for releasing permission transform locking sent for receiving the migration server, the releasing
The instruction of permission transform locking is used to indicate described device when receiving second authority information of the file, according to described
Second authority information updates first authority information of the file.
14. a kind of system of migrated file permission, which is characterized in that including migration server, source device and target device;
Wherein, the source device for storage file the first authority information and file the second authority information, described first
Authority information includes the file permission that the first agreement is supported, second authority information includes the file power that second protocol is supported
Limit;
The migration server is used for: reading the first authority information of file, Yi Jitong from source device by first agreement
It crosses first agreement and first authority information is sent to target device;
The target device is used for: being received first permission that the migration server is sent by first agreement and is believed
Breath, and save first authority information;
The migration server is also used to: Xiang Suoshu target device sends the instruction of locked authority conversion, and the locked authority turns
The instruction changed is used to indicate the target device when receiving the second authority information of the file, keeps the first permission letter
It ceases constant;
The target device is also used to: receiving the instruction of the locked authority conversion;
The migration server is also used to: reading second power of the file from the source device by the second protocol
Limit information, and second authority information is sent to by the target device by the second protocol;
The target device is also used to: being received second authority information, and is kept according to the instruction of locked authority conversion
First authority information is constant.
15. system according to claim 14, which is characterized in that further include:
The target device is also used to: save second authority information, and to migration server sending permission migration at
Function response;
The migration server is also used to: receiving the permission migration success response, Xiang Suoshu target device, which is sent, releases permission
The instruction of locking is converted, the instruction for releasing permission transform locking is used to indicate the target device and is receiving the file
When second authority information, updated according to first authority information of second authority information to the file.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611055336.3A CN106649600B (en) | 2016-11-25 | 2016-11-25 | A kind of method, apparatus and system of migrated file permission |
PCT/CN2017/081337 WO2018094962A1 (en) | 2016-11-25 | 2017-04-21 | Method, apparatus and system for migrating file permission |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611055336.3A CN106649600B (en) | 2016-11-25 | 2016-11-25 | A kind of method, apparatus and system of migrated file permission |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106649600A CN106649600A (en) | 2017-05-10 |
CN106649600B true CN106649600B (en) | 2019-07-09 |
Family
ID=58812082
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611055336.3A Active CN106649600B (en) | 2016-11-25 | 2016-11-25 | A kind of method, apparatus and system of migrated file permission |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106649600B (en) |
WO (1) | WO2018094962A1 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10997132B2 (en) | 2017-02-07 | 2021-05-04 | Oracle International Corporation | Systems and methods for live data migration with automatic redirection |
CN112511627B (en) * | 2018-01-25 | 2022-09-23 | 华为技术有限公司 | Method and device for migrating metadata |
CN108446337B (en) * | 2018-02-28 | 2019-09-13 | 新华三云计算技术有限公司 | A kind of lock resources control permission moving method and device |
CN109446825B (en) * | 2018-10-22 | 2021-08-31 | 郑州云海信息技术有限公司 | A method and device for extending access control authority |
CN110941599A (en) * | 2019-11-12 | 2020-03-31 | 浪潮电子信息产业股份有限公司 | An authority control method, device, electronic device and storage medium |
CN117951080A (en) * | 2022-10-18 | 2024-04-30 | 华为技术有限公司 | Method for migrating file system and related equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101626378A (en) * | 2009-08-14 | 2010-01-13 | 成都市华为赛门铁克科技有限公司 | Method, device and system for managing authority information |
CN102281141A (en) * | 2011-07-26 | 2011-12-14 | 成都市华为赛门铁克科技有限公司 | Document permission management method, apparatus and system |
CN102369713A (en) * | 2011-08-29 | 2012-03-07 | 华为技术有限公司 | Automatic removing method and device of system configuration items |
CN103037008A (en) * | 2012-12-24 | 2013-04-10 | 珠海金山办公软件有限公司 | Authority management method and system of synchronous network disk |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5151488B2 (en) * | 2008-01-09 | 2013-02-27 | 富士ゼロックス株式会社 | Authority information management apparatus, information processing system, and program |
JP5614073B2 (en) * | 2010-03-29 | 2014-10-29 | ヤマハ株式会社 | Relay device |
CN102170440B (en) * | 2011-03-24 | 2013-12-04 | 北京大学 | Method suitable for safely migrating data between storage clouds |
US9116913B2 (en) * | 2012-04-25 | 2015-08-25 | Hitachi, Ltd. | File storage system and file cloning method |
US9336406B2 (en) * | 2013-11-14 | 2016-05-10 | Futurewei Technologies, Inc. | Multiprotocol access control list with guaranteed protocol compliance |
CN105843554B (en) * | 2016-03-11 | 2019-03-01 | 中国联合网络通信集团有限公司 | The method and its system of Data Migration based on object storage |
-
2016
- 2016-11-25 CN CN201611055336.3A patent/CN106649600B/en active Active
-
2017
- 2017-04-21 WO PCT/CN2017/081337 patent/WO2018094962A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101626378A (en) * | 2009-08-14 | 2010-01-13 | 成都市华为赛门铁克科技有限公司 | Method, device and system for managing authority information |
CN102281141A (en) * | 2011-07-26 | 2011-12-14 | 成都市华为赛门铁克科技有限公司 | Document permission management method, apparatus and system |
CN102369713A (en) * | 2011-08-29 | 2012-03-07 | 华为技术有限公司 | Automatic removing method and device of system configuration items |
CN103037008A (en) * | 2012-12-24 | 2013-04-10 | 珠海金山办公软件有限公司 | Authority management method and system of synchronous network disk |
Also Published As
Publication number | Publication date |
---|---|
CN106649600A (en) | 2017-05-10 |
WO2018094962A1 (en) | 2018-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106649600B (en) | A kind of method, apparatus and system of migrated file permission | |
US11533220B2 (en) | Network-assisted consensus protocol | |
JP7218447B2 (en) | Policy control method, device and system | |
CN105681081B (en) | Physical machine management method and device | |
CN102857578B (en) | A kind of file uploading method of network hard disc, system and net dish client | |
CN103180842A (en) | Cloud computing system and data synchronization method therefor | |
CN106663012B (en) | Hardware acceleration method and related equipment | |
CN106339177A (en) | Method and device for creating virtual machines | |
CN109074286A (en) | Control to the application for using system resource | |
US20230221997A1 (en) | System and method for subscription management using composed systems | |
CN106716335A (en) | Asynchronous processing of mapping information | |
CN106817388B (en) | Method and device for acquiring data by virtual machine and host machine and system for accessing data | |
CN112631780A (en) | Resource scheduling method and device, storage medium and electronic equipment | |
CN110213290A (en) | Data capture method, API gateway and storage medium | |
CN112596825B (en) | Cloud desktop starting method and device | |
Mealha et al. | Data replication on the cloud/edge | |
CN109150593B (en) | Method and device for managing resources in cloud data system | |
CN106534227A (en) | Method and device of expanding distributed consistency service | |
EP3985493A1 (en) | Group member management method and apparatus, group message processing method and apparatus, device, and storage medium | |
CN105844171B (en) | Method and device for file synchronization control | |
CN106230893A (en) | A data synchronization method based on hybrid cloud storage | |
CN114422538B (en) | Multi-cloud storage system, multi-cloud data reading and writing method and electronic equipment | |
CN110502574A (en) | Information synchronization method, user equipment, storage medium and the device of cross-system | |
WO2014177080A1 (en) | Method and device for processing resource object storage | |
CN109885258A (en) | Data deletion apparatus and method based on block chain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |