Bug 11250 - somehow can delete root files
Summary: somehow can delete root files
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.1.17
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2015-05-03 10:31 UTC by mail
Modified: 2017-01-03 08:01 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description mail 2015-05-03 10:31:30 UTC
smbd version 4.1.17-Debian 8

i have this in smb.conf:
path = /usr/samba/video
valid users = +smb
write list = chicker

if i will make a /usr/samba/video/file 600 as root then user chicker can't read it
user chicker can delete it!
user chicker can NOT delete it if chmod is 400

same case with dir don't have this bug
user chicker can't delete root dir 700
even that dir is still a file in *nix but no access for dirs

/usr/samba/video is chicker:smb 750

so is that bug or i do something wrong?
Comment 1 Andrew Bartlett 2017-01-03 08:01:59 UTC
Delete permission is related to the directory, not the file.  Therefore even if the file is owned by root, it can be deleted by the owner of the directory, "chicker".

I hope this clarifies things.