Bug 1912 - samba ignores chattr attributes
Summary: samba ignores chattr attributes
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.7
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-11 09:36 UTC by Jonathan Will
Modified: 2004-10-22 11:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Will 2004-10-11 09:36:00 UTC
if i setup a file, with the attribute 'Undeletable', samba will delete the file 
anyway.
Comment 1 Jeremy Allison 2004-10-21 12:24:38 UTC
Can you give more information, including *exactly* how you have set up Samba on
the share, what user you're doing this as and what you did.
Thanks,
Jeremy.
Comment 2 Jonathan Will 2004-10-21 15:49:20 UTC
(In reply to comment #1)
> Can you give more information, including *exactly* how you have set up Samba 
on
> the share, what user you're doing this as and what you did.
> Thanks,
> Jeremy.

I logged in via ssh, created a file and gave it the undeletable attribute
#touch file;
#chattr +u file

My share setup looks like this:
[Jons Home]
comment = asdf
path = /home/jon
guest ok = No
browseable = Yes
read only = No
valid users = jon

Then, browsed to the share, and deleted the file. 
Comment 3 Jeremy Allison 2004-10-22 11:16:38 UTC
This is not a Samba bug. You're misunderstanding the meaning of the 'u'
bit in chattr. From the man page :

       When a file with the ‘u’ attribute set is  deleted,  its  contents  are
       saved.  This allows the user to ask for its undeletion.

This doesn't stop the file from being deleted, it specifies what can happen
after. Closing as not a bug.
Jeremy.