Bug 9116 - Try to delete files without permissions give no message, ERRORLEVEL is 0
Summary: Try to delete files without permissions give no message, ERRORLEVEL is 0
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.5.17
Hardware: PPC AIX
: P5 critical
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-23 11:55 UTC by Walter Laub
Modified: 2018-03-28 08:46 UTC (History)
2 users (show)

See Also:


Attachments
samba.log, log level = 10 (157.82 KB, application/x-zip)
2012-08-24 14:26 UTC, Walter Laub
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Laub 2012-08-23 11:55:31 UTC
samba 3.5.17 on AIX 5.3

Scenario: try to delete a file without permissions, will give no warning or message and ERRORLEVEL is zero:

DEL [SHARE]\test.txt
IF ERRORLEVEL 1 ECHO Error

(the file is not deleted)
Comment 1 Jeremy Allison 2012-08-23 16:55:36 UTC
Debug level 10 log from smbd please. We should be returning a NT_STATUS_ACCESS_DENIED on file open. If we return it on close (when we actually are requested to do the delete - as to delete a file the client requests and open with "delete-on-close" set and then closes the file - then the client ignores the error on the close :-(. ). Windows is very sad :-(.

Jeremy.
Comment 2 Walter Laub 2012-08-24 14:26:01 UTC
Created attachment 7818 [details]
samba.log, log level = 10

In the log file you will find 2 delete from Windows Explorer (GUI) and 1 from cmd.
No message or errorlevel > 0 (cmd) is returned.
Comment 3 Björn Jacke 2018-03-27 20:53:56 UTC
is this still an issue with recent samba 4 versions?
Comment 4 Walter Laub 2018-03-28 08:24:53 UTC
Oh, an old issue :-)

I tested again, now on Linux, no AIX with samba 4 available:
smbd -V
Version 4.6.3-git.25.0c154becb132.1-SUSE-oS13.1-x86_64

Client is Winodws 10, 1709:
del [SMB-SHARE-Folder]\test.txt
[SMB-SHARE-Folder]\test.txt
Zugriff verweigert ("Access denied")

But ERRORLEVEL is still 0. Not sure, but possible, this is client (Windows) related?
Comment 5 Björn Jacke 2018-03-28 08:46:15 UTC
well, looks like windows relates, "del thisfiledoesnotexist" even results in ERRORLEVEL 0 on local storage. Closing this bug accrdingly now.