- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to set file locks from Samba for Unix processe...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2003 11:26 AM
тАО09-10-2003 11:26 AM
How to set file locks from Samba for Unix processes?
I have next configuration: NT machine puts files to Samba share on the Unix host and then other clients take these files from this share via FTP.
But sometimes they take these files a bit earlier than NT machine finishes to write them. Of course, in this case clients take a broken files (zero-padded).
I tried to set up next options in smb.conf:
oplocks = no
locking = yes
strict locking = yes
but it doesn't help.
I checked a presence of /var/opt/samba/locks dir. It's exists but contains four files only: status.lck, browse.dat, smbd.pid, nmbd.pid.
But problem still exists: Smbd can't prevent locked files from being taken by ftpd.
My next idea is to use "map share modes" but I don't sure that it is right option.
I use HP9000 K420 server, HP-UX 11i and standard Samba/CIFS9000 Server shipped with this HP-UX distributive.
What must I do to solve this problem?
Thanks for any advices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2003 11:38 AM
тАО09-10-2003 11:38 AM
Re: How to set file locks from Samba for Unix processes?
It's an option!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2003 11:51 AM
тАО09-10-2003 11:51 AM
Re: How to set file locks from Samba for Unix processes?
e.g. Suppose that myfile was originally given 664 permission; by setting myfile to 2644 file locking is enforced. Now for the bad news: File locks for network files (NFS) are ALWAYS advisory regardless of the setgid bit and I strongly suspect that Samba shares adopt this policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2003 08:30 PM
тАО09-10-2003 08:30 PM
Re: How to set file locks from Samba for Unix processes?
Put this option in global section of smb.conf
kernel oplocks = yes
Restart samba daemons and if possible the server.
I assume that HP-UX 11i supports kernel oplocks.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2003 03:59 AM
тАО09-11-2003 03:59 AM
Re: How to set file locks from Samba for Unix processes?
In addition, Samba will not override permissions set at the OS level, so if as was suggested, doing setgid will actually force HP-UX OS to enforce fcntl locks, rather than them being advisory, then samba would respect this (unless of course you are sharing out an NFS filesystem, where the previous poster notes that the setgid trick does not work). Bottom line, though - samba respects the permissions and ownership at the HP-UX level -if the HPUX program (ftp or any other) does not respect an fcntl lock, then samba will not be able to protect that file from abuse.
Hope this helps.