Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Samba: how to lock file in use
Samba: how to lock file in use
Hello fellows,
This is my first request so let me a few introduction: I'm Davide from Italy and living in Spain right now. I've been working as sys admin during 2 years...4 years ago! Last version of Debian I've worked was Lenny. Now I'm working for a web agency as web developer and I started to propose some internal improvements: configure the server we have for basic needs, and first of all SAMBA.
I already installed Debian 9 and configured basics network stuff, installed Samba, created users and everything is working fine..but most important issue is to prevent anyone from opening a file in use, and seems it's not working/set.
I tried with a PSD and my mate did the same with that file, but it wasn't flag as locked.
Any suggestions? I Googled with different terms but nothing..
Thanks in advance to the community:)
This is my first request so let me a few introduction: I'm Davide from Italy and living in Spain right now. I've been working as sys admin during 2 years...4 years ago! Last version of Debian I've worked was Lenny. Now I'm working for a web agency as web developer and I started to propose some internal improvements: configure the server we have for basic needs, and first of all SAMBA.
I already installed Debian 9 and configured basics network stuff, installed Samba, created users and everything is working fine..but most important issue is to prevent anyone from opening a file in use, and seems it's not working/set.
I tried with a PSD and my mate did the same with that file, but it wasn't flag as locked.
Any suggestions? I Googled with different terms but nothing..
Thanks in advance to the community:)
Re: Samba: how to lock file in use
You might have better luck here: https://www.samba.org/
Nobody would ever ask questions If everyone possessed encyclopedic knowledge of the man pages.
Re: Samba: how to lock file in use
+1acewiza wrote:You might have better luck here: https://www.samba.org/
I always go there for my samba issues. Very good docs and easy to navigate.
Re: Samba: how to lock file in use
well I'm kinda dumb then cuz I didn't consider it4D696B65 wrote:+1acewiza wrote:You might have better luck here: https://www.samba.org/
I always go there for my samba issues. Very good docs and easy to navigate.
Ok thanks I'll check and let you know.
Re: Samba: how to lock file in use
No luck on Samba.org
anyway ideas? I was thinking even to set just a "read-only" when file is opened from another user, it's not really necessary to "lock" it
anyway ideas? I was thinking even to set just a "read-only" when file is opened from another user, it's not really necessary to "lock" it
-
- df -h | grep > 20TiB
- Posts: 1418
- Joined: 2012-10-06 05:31
- Location: /dev/chair
- Has thanked: 80 times
- Been thanked: 191 times
Re: Samba: how to lock file in use
Elaborate. What did you try?gi4mpy wrote:No luck on Samba.org
Presumably, as this machine is a "server", file access will be over SAMBA, and SAMBA only?
I'm pretty sure SAMBA supports this type of locking by default, You have looked here, right?
If you have non-samba writers as well, you will probably want to look into kernel oplocks.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Re: Samba: how to lock file in use
I tried oplocks and locking...but I just mind that in the office all the employees are working with Mac OS. I suppose it changes everything because the documentation is about Windowssteve_v wrote:Elaborate. What did you try?gi4mpy wrote:No luck on Samba.org
Presumably, as this machine is a "server", file access will be over SAMBA, and SAMBA only?
I'm pretty sure SAMBA supports this type of locking by default, You have looked here, right?
If you have non-samba writers as well, you will probably want to look into kernel oplocks.
anyway right now this is the following config on smb.conf regarding the folder
---
[foldername]
path = /home/foldername
browseable = yes
guest ok = no
security = user
read only = no
create mask = 0775
directory mask = 0775
valid users = @groupname
---
anyway what I just want to prevent is to "overwrite" a file if someone is already working on it. As I said I worked on Debian more than 4 years ago and the major problem is that I don't remember a lot of things..
-
- df -h | grep > 20TiB
- Posts: 1418
- Joined: 2012-10-06 05:31
- Location: /dev/chair
- Has thanked: 80 times
- Been thanked: 191 times
Re: Samba: how to lock file in use
Dunno whether this changes anything or not, oplocks do require client cooperation but I know zilch about the SMB implementation on MacOS.gi4mpy wrote:in the office all the employees are working with Mac OS.
All I can say is that locking works as described with both samba and windows 7 clients, for me at any rate.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Re: Samba: how to lock file in use
Now that I see you are trying to integrate different filesystem comm protocols (Apple-CIFS, SAMBA, and ExtX), I wish you luck. Apple is notorious for tweaking their comm and FS protocols without any sort of cooperation and notification to the outside world. Things that worked well with Apple one day turn up broken the next, for no apparent reason.
Nobody would ever ask questions If everyone possessed encyclopedic knowledge of the man pages.
Re: Samba: how to lock file in use
Basically I'm fuc**dacewiza wrote:Now that I see you are trying to integrate different filesystem comm protocols (Apple-CIFS, SAMBA, and ExtX), I wish you luck. Apple is notorious for tweaking their comm and FS protocols without any sort of cooperation and notification to the outside world. Things that worked well with Apple one day turn up broken the next, for no apparent reason.
Sorry if I didn't provide properly all the details. So I suppose the "best" solution is to keep the actual configuration and live with it. There aren't more than 10 employees so maybe it will not be a big deal.
Thank you all guys, we can close this thread.
-
- df -h | grep > 20TiB
- Posts: 1418
- Joined: 2012-10-06 05:31
- Location: /dev/chair
- Has thanked: 80 times
- Been thanked: 191 times
Re: Samba: how to lock file in use
Well if samba doesn't do what you need, and you run an all Apple house, and you're feeling adventurous... there's always the Mac way.
I can't help you set it up though, my knowledge of AFP goes as far as "it exists, and somebody probably uses it".
I can't help you set it up though, my knowledge of AFP goes as far as "it exists, and somebody probably uses it".
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Re: Samba: how to lock file in use
Wow I didn't know about this looks interesting but I prefer to keep Debian.. I love Debian. Anyhow I want to install more services on this machine to one more reason to stay Debian and stay cool^steve_v wrote:Well if samba doesn't do what you need, and you run an all Apple house, and you're feeling adventurous... there's always the Mac way.
I can't help you set it up though, my knowledge of AFP goes as far as "it exists, and somebody probably uses it".
Thanks a lot for the tip
-
- df -h | grep > 20TiB
- Posts: 1418
- Joined: 2012-10-06 05:31
- Location: /dev/chair
- Has thanked: 80 times
- Been thanked: 191 times
Re: Samba: how to lock file in use
Netatalk is in the Debian repos...gi4mpy wrote:I didn't know about this looks interesting but I prefer to keep Debian..
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Re: Samba: how to lock file in use
Ouch I dunno why I thought it was a distro linux-based for Mac OSsteve_v wrote:Netatalk is in the Debian repos...gi4mpy wrote:I didn't know about this looks interesting but I prefer to keep Debian..
Re: Samba: how to lock file in use
Have you considered using some kind of Version Control System instead of Samba? Subversion, Git, et al.