Ralph Boehme
2019-Nov-28 13:19 UTC
[Samba] hp-ux samba windows client fails to delete directory
On 11/28/19 11:13 AM, Kumar, Arjit (SSTO) via samba wrote:> I am able to re-produce the same behavior with samba 4.10.0 on Ubuntu 1904 as it was on hp-ux with samba 4.9.0. > > Scenario:- > 1. Configure samba as PDC and start smbd and nmbd daemons. > 2. Map samba share on 2 Windows PC#1 and PC#2 with same credentials created by pdbedit -a command > 3. Windows PC#1 creates two directories, \FOLDER_A\FOLDER_B in the Samba share > 4. Change directory to \ > 5. Windows PC#2 changes from a current directory to \FOLDER_A\FOLDER_B (i.e., user on PC#2 is accessing FOLDER_B under FOLDER_A and session is active) > 6. Windows PC#1 tries to delete \FOLDER_A > Sometimes, \FOLDER_A\FOLDER_B gets deleted but not \FOLDER_A, while sometime both \FOLDER_A and , \FOLDER_A\FOLDER_B got deleted. > 7. Same behavior is seen when doing those operations using smbclient on HP-UX > > NOTE: If no user is accessing FOLDER_B, removal of FOLDER_A is successful. > > Please help me understand what should be the expected behavior in such scenario.yes, probably works as designed. Cf the option "strict rename", it applies to deleting directories as well. It's disabled by default which explains why you can delete modulo strange errors. -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/ GPG-Fingerprint FAE2C6088A24252051C559E4AA1E9B7126399E46
Kumar, Arjit (SSTO)
2019-Dec-05 08:58 UTC
[Samba] hp-ux samba windows client fails to delete directory
Hi, Thanks for your reply.>> yes, probably works as designed.I have enabled "strict rename" also but the behavior is still same. As some time \FOLDER_A\FOLDER_B gets deleted but not \FOLDER_A, while sometime both \FOLDER_A and , \FOLDER_A\FOLDER_B got deleted. Behavior is not consistent in this scenario. Which one of above is expected behavior by design ? -----Original Message----- From: Ralph Boehme [mailto:slow at samba.org] Sent: Thursday, November 28, 2019 6:49 PM To: Kumar, Arjit (SSTO) <arjit.kumar at hpe.com>; Rowland penny <rpenny at samba.org>; samba at lists.samba.org Subject: Re: [Samba] hp-ux samba windows client fails to delete directory On 11/28/19 11:13 AM, Kumar, Arjit (SSTO) via samba wrote:> I am able to re-produce the same behavior with samba 4.10.0 on Ubuntu 1904 as it was on hp-ux with samba 4.9.0. > > Scenario:- > 1. Configure samba as PDC and start smbd and nmbd daemons. > 2. Map samba share on 2 Windows PC#1 and PC#2 with same credentials created by pdbedit -a command > 3. Windows PC#1 creates two directories, \FOLDER_A\FOLDER_B in the Samba share > 4. Change directory to \ > 5. Windows PC#2 changes from a current directory to \FOLDER_A\FOLDER_B (i.e., user on PC#2 is accessing FOLDER_B under FOLDER_A and session is active) > 6. Windows PC#1 tries to delete \FOLDER_A > Sometimes, \FOLDER_A\FOLDER_B gets deleted but not \FOLDER_A, while sometime both \FOLDER_A and , \FOLDER_A\FOLDER_B got deleted. > 7. Same behavior is seen when doing those operations using smbclient on HP-UX > > NOTE: If no user is accessing FOLDER_B, removal of FOLDER_A is successful. > > Please help me understand what should be the expected behavior in such scenario.yes, probably works as designed. Cf the option "strict rename", it applies to deleting directories as well. It's disabled by default which explains why you can delete modulo strange errors. -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/ GPG-Fingerprint FAE2C6088A24252051C559E4AA1E9B7126399E46
Ralph Boehme
2019-Dec-05 09:37 UTC
[Samba] hp-ux samba windows client fails to delete directory
On 12/5/19 9:58 AM, Kumar, Arjit (SSTO) wrote:>> yes, probably works as designed. > I have enabled "strict rename" also but the behavior is still same. > As some time \FOLDER_A\FOLDER_B gets deleted but not \FOLDER_A, while sometime both \FOLDER_A and , \FOLDER_A\FOLDER_B got deleted. > Behavior is not consistent in this scenario. > Which one of above is expected behavior by design ?It depends. :) If user 2 with cwd in folder_b really has a open handle on that dir, then with strict rename enabled I'd expect the client attempting the delete should get a consistent error message. I recommend taking a closer look at network traces and code. -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/ GPG-Fingerprint FAE2C6088A24252051C559E4AA1E9B7126399E46
Reasonably Related Threads
- hp-ux samba windows client fails to delete directory
- hp-ux samba windows client fails to delete directory
- hp-ux samba windows client fails to delete directory
- hp-ux samba windows client fails to delete directory
- hp-ux samba windows client fails to delete directory