1"use strict";(self.webpackChunksync_in_site=self.webpackChunksync_in_site||[]).push([["1150"],{17978(e,n,i){i.r(n),i.d(n,{metadata:()=>o,default:()=>g,frontMatter:()=>c,contentTitle:()=>a,toc:()=>h,assets:()=>d});var o=JSON.parse('{"id":"user-guide/file_locking","title":"File Locking","description":"File locking ensures consistency and data integrity during concurrent operations, regardless of the","source":"@site/docs/user-guide/file_locking.mdx","sourceDirName":"user-guide","slug":"/user-guide/file_locking","permalink":"/docs/user-guide/file_locking","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Full-Text Search","permalink":"/docs/user-guide/search"},"next":{"title":"Collaboration","permalink":"/docs/category/collaboration"}}'),s=i(74848),t=i(28453),r=i(38586),l=i(66497);let c={},a="File Locking",d={},h=[{value:"Exclusive Lock",id:"exclusive-lock",level:2},{value:"Shared Lock",id:"shared-lock",level:2},{value:"Lock Actions",id:"lock-actions",level:2}];function u(e){let n={a:"a",admonition:"admonition",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"file-locking",children:"File Locking"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"File locking"})," ensures ",(0,s.jsx)(n.strong,{children:"consistency"})," and ",(0,s.jsx)(n.strong,{children:"data integrity"})," during concurrent operations, regardless of the\naccess method used (web interface, WebDAV, synchronization, collaborative editors, or API)."]}),"\n",(0,s.jsxs)(n.p,{children:["Two types of locks are used depending on the nature of the operations: ",(0,s.jsx)(n.strong,{children:"exclusive"})," and ",(0,s.jsx)(n.strong,{children:"shared"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Even when a document is ",(0,s.jsx)(n.strong,{children:"locked by an external source"}),", it remains ",(0,s.jsx)(n.strong,{children:"visible in the web interface"})," and may, in some cases,\nbe subject to specific management actions."]}),"\n",(0,s.jsx)(r.A,{title:"File Locking",alt:"Sync-in file locking status in the file manager",style:{maxHeight:"275px",borderRadius:"10px"},sources:{light:(0,l.Ay)("/img/docs/file_locking/file-locking.png"),dark:(0,l.Ay)("/img/docs/file_locking/file-locking-dark.png")}}),"\n",(0,s.jsx)(n.h2,{id:"exclusive-lock",children:"Exclusive Lock"}),"\n",(0,s.jsxs)(n.p,{children:["An ",(0,s.jsx)(n.strong,{children:"exclusive lock"})," prevents any ",(0,s.jsx)(n.strong,{children:"concurrent write operation"})," on a file while the lock is active, while\n",(0,s.jsx)(n.strong,{children:"allowing read access"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"It is used to ensure that a modification cannot be interrupted or conflict with another write operation."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Exclusive lock contexts"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Creating or updating files (upload via WebDAV or browser)"}),"\n",(0,s.jsx)(n.li,{children:"File synchronization"}),"\n",(0,s.jsx)(n.li,{children:"Simple text editing (non-collaborative editor)"}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["An ",(0,s.jsx)(n.strong,{children:"exclusive lock"})," cannot be applied if a ",(0,s.jsx)(n.strong,{children:"lock is already present"})," on the file, regardless of its nature."]})}),"\n",(0,s.jsx)(n.h2,{id:"shared-lock",children:"Shared Lock"}),"\n",(0,s.jsxs)(n.p,{children:["A ",(0,s.jsx)(n.strong,{children:"shared lock"})," allows multiple users to access a file simultaneously in a controlled context.\nIt enables reading and concurrent content modification when the tool supports it."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Shared lock context"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"collaborative_editors",children:"Collaborative editing"})," via Collabora Online, OnlyOffice, or Euro-Office."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Shared locks are ",(0,s.jsx)(n.strong,{children:"application-specific"})," to the one that creates them.\nIf a document is locked via ",(0,s.jsx)(n.strong,{children:"OnlyOffice"}),", it cannot be opened for editing via ",(0,s.jsx)(n.strong,{children:"Collabora Online"})," or ",(0,s.jsx)(n.strong,{children:"Euro-Office"}),", and the same isolation applies\nbetween the other collaborative editors."]})}),"\n",(0,s.jsx)(n.h2,{id:"lock-actions",children:"Lock Actions"}),"\n",(0,s.jsx)(r.A,{title:"Unlock Request",alt:"Sync-in unlock request action for a locked file",style:{maxHeight:"175px",borderRadius:"10px"},sources:{light:(0,l.Ay)("/img/docs/file_locking/unlock-request.png"),dark:(0,l.Ay)("/img/docs/file_locking/unlock-request-dark.png")}}),"\n",(0,s.jsx)(n.p,{children:"Depending on your role and the lock status, different actions are possible:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["If you ",(0,s.jsx)(n.strong,{children:"are not the lock owner"}),", you can ",(0,s.jsx)(n.strong,{children:"submit an unlock request"}),", which will be ",(0,s.jsx)(n.strong,{children:"sent via notification"}),"\nto the user currently holding the lock."]}),"\n",(0,s.jsxs)(n.li,{children:["If you are ",(0,s.jsx)(n.strong,{children:"the lock owner"})," and the lock is ",(0,s.jsx)(n.strong,{children:"expired or stuck"})," (stale lock), you can ",(0,s.jsx)(n.strong,{children:"force unlock"})," the file,\nprovided that ",(0,s.jsx)(n.strong,{children:"no modification is in progress"}),"."]}),"\n"]})]})}function g(e={}){let{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},28453(e,n,i){i.d(n,{R:()=>r,x:()=>l});var o=i(96540);let s={},t=o.createContext(s);function r(e){let n=o.useContext(t);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.