Đào Mỹ Linh
Member
How do I lock a file in Linux?
Answer
To enable mandatory file locking in Linux, two requirements must be satisfied:
Answer
To enable mandatory file locking in Linux, two requirements must be satisfied:
- We must mount the file system with the mand option (mount -o mand FILESYSTEM MOUNT_POINT).
- We must turn on the set-group-ID bit and turn off the group-execute bit for the files we are about to lock (chmod g+s,g-x FILE).