Questions tagged [lock]
Use for questions regarding the mechanism to prevent concurrent access to shared resources by means of lock files or in-memory synchronization primitives. For the mechanism to prevent access to unattended desktop computers, use "screen-lock" instead. For questions regarding the unresponsive computer programs, use "freeze" instead.
143 questions
0 votes
0 answers
94 views
Cannot open LibreOffice files on Samba share concurrently on Debian Linux - File locking issue
We have a Samba file server and use Debian Linux for both server and clients. Everything works fine. Except for one thing: If someone opens a LibreOffice document (mainly Calc / *.ods), nobody else ...
0 votes
0 answers
44 views
Delayed systemd slock autolock
I've been playing with this autoslock.service file: [Unit] Description=Lock the screen on suspend +Before=sleep.target [Service] User=garrett Environment=DISPLAY=:0 ExecStart=/usr/local/bin/slock [...
0 votes
1 answer
46 views
Is mmap holding a reference to the OFD specified by POSIX, or a Linux extension, and where is it documented?
I am using Open File Description (OFD) owned locks on Linux (fcntl with command F_OFD_SETLK). After locking a file, I memory mapped it, and closed the file descriptor. Another process tried to lock ...
2 votes
1 answer
74 views
How does fnctl provide byte range locks?
fnctl (https://man7.org/linux/man-pages/man2/fcntl.2.html) supports locking a portion of a file (specified by start position and length). Behind the scenes, what does the algorithm look like? I'm ...
0 votes
0 answers
336 views
What's the best way to lock a directory from remove & edits?
I have a few directories that I want to lock. This lock should provide the following: Disallow anyone (including myself) from removing from that directory without a password Disallow anyone (...
3 votes
1 answer
169 views
file locking mandated by OS/filesystem rather than opted into by file accessors?
Is there a way to have the OS (specifically, FreeBSD) or filesystem (specifically, ZFS) enforce that all access (or, at least, all non-root access, I guess) to a certain file must be done while the ...
5 votes
3 answers
948 views
Lock a bash script based on parameter?
I'm trying to find a way to lock a script based on a parameter given, but was unsuccessful in finding a proper answer. What I'm trying to achieve is prevent another user from running a script based on ...
0 votes
1 answer
137 views
How to customize default linux/unix PAM module faillock to lock user in all nodes in a cluster
I have implemented faillock in all nodes in cluster, so If any user failed login attempts three time through ssh he will be locked for certain period.It is working fine on individual node but I wanted ...