FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-21-2012, 08:59 PM
Thufir
 
Default chmod 444 *

Under what conditions can this file get deleted?

thufir@dur:/var/spool/news/interesting.groups$
thufir@dur:/var/spool/news/interesting.groups$ ll /var/spool/news/
interesting.groups/gmane.linux.ubuntu.user
-r--r--r-- 1 news news 0 Sep 9 23:37 /var/spool/news/interesting.groups/
gmane.linux.ubuntu.user
thufir@dur:/var/spool/news/interesting.groups$



I want that this file can be read, but not deleted. I looked through
https://help.ubuntu.com/community/FilePermission
but wasn't sure that I have the correct setting.


-Thufir


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-21-2012, 09:02 PM
William Scott Lockwood III
 
Default chmod 444 *

On Sep 21, 2012 4:00 PM, "Thufir" <hawat.thufir@gmail.com> wrote:

>

> Under what conditions can this file get deleted?

>

> thufir@dur:/var/spool/news/interesting.groups$

> thufir@dur:/var/spool/news/interesting.groups$ ll /var/spool/news/

> interesting.groups/gmane.linux.ubuntu.user

> -r--r--r-- 1 news news 0 Sep *9 23:37 /var/spool/news/interesting.groups/

> gmane.linux.ubuntu.user

> thufir@dur:/var/spool/news/interesting.groups$

>

>

>

> I want that this file can be read, but not deleted. *I looked through

> https://help.ubuntu.com/community/FilePermission

> but wasn't sure that I have the correct setting.

>

>

> -Thufir


Now do chattr +i to the file.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-21-2012, 09:35 PM
KD
 
Default chmod 444 *

William Scott Lockwood III <vladinator <at> gmail.com> writes:

> On Sep 21, 2012 4:00 PM, "Thufir" <hawat.thufir <at> gmail.com> wrote:
> >
> > Under what conditions can this file get deleted?

Under the condition that the permissions of the directory containing it allow it.

> > thufir <at> dur:/var/spool/news/interesting.groups$
> > thufir <at> dur:/var/spool/news/interesting.groups$ ll /var/spool/news/
> > interesting.groups/gmane.linux.ubuntu.user
> > -r--r--r-- 1 news news 0 Sep 9 23:37 /var/spool/news/interesting.groups/
> > gmane.linux.ubuntu.user
> > thufir <at> dur:/var/spool/news/interesting.groups$
> >
> >
> >
> > I want that this file can be read, but not deleted. I looked through
> > https://help.ubuntu.com/community/FilePermission
> > but wasn't sure that I have the correct setting.

Well, that a non-existing wiki page provides only little enlightment, should
come as no surprise.
OTOH
https://help.ubuntu.com/community/FilePermissions
has all info.

> Now do chattr +i to the file.

Irrelevant. Whether or not a file may be deleted has nothing to do with the
permissions of the file itself - only the permissions of the directory
containing it matter.

--
KD


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-21-2012, 09:40 PM
William Scott Lockwood III
 
Default chmod 444 *

On Sep 21, 2012 4:36 PM, "KD" <kdall99@hotmail.com> wrote:

>

> William Scott Lockwood III <vladinator <at> gmail.com> writes:

>

> > On Sep 21, 2012 4:00 PM, "Thufir" <hawat.thufir <at> gmail.com> wrote:

> > >

> > > Under what conditions can this file get deleted?

>

> Under the condition that the permissions of the directory containing it allow it.

>

> > > thufir <at> dur:/var/spool/news/interesting.groups$

> > > thufir <at> dur:/var/spool/news/interesting.groups$ ll /var/spool/news/

> > > interesting.groups/gmane.linux.ubuntu.user

> > > -r--r--r-- 1 news news 0 Sep *9 23:37 /var/spool/news/interesting.groups/

> > > gmane.linux.ubuntu.user

> > > thufir <at> dur:/var/spool/news/interesting.groups$

> > >

> > >

> > >

> > > I want that this file can be read, but not deleted. *I looked through

> > > https://help.ubuntu.com/community/FilePermission

> > > but wasn't sure that I have the correct setting.

>

> Well, that a non-existing wiki page provides only little enlightment, should

> come as no surprise.

> OTOH

> https://help.ubuntu.com/community/FilePermissions

> has all info.

>

> > Now do chattr +i to the file.

>

> Irrelevant. Whether or not a file may be deleted has nothing to do with the

> permissions of the file itself - only the permissions of the directory

> containing it matter.

>

> --

> KD


Making the file immutable will prevent any modification. Thus the 'immutable' part.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-21-2012, 09:48 PM
KD
 
Default chmod 444 *

KD <kdall99 <at> hotmail.com> writes:

> William Scott Lockwood III <vladinator <at> gmail.com> writes:

> > Now do chattr +i to the file.
>
> Irrelevant. Whether or not a file may be deleted has nothing to do with the
> permissions of the file itself - only the permissions of the directory
> containing it matter.

You're right.
I read "chmod" instead of "chattr".

--
KD


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-21-2012, 10:45 PM
Avi Greenbury
 
Default chmod 444 *

Thufir wrote:
> Under what conditions can this file get deleted?
>
> thufir@dur:/var/spool/news/interesting.groups$
> thufir@dur:/var/spool/news/interesting.groups$ ll /var/spool/news/
> interesting.groups/gmane.linux.ubuntu.user
> -r--r--r-- 1 news news 0 Sep 9 23:37 /var/spool/news/interesting.groups/
> gmane.linux.ubuntu.user
> thufir@dur:/var/spool/news/interesting.groups$

Other people have covered preventing anyone from deleting it, but in
answer to the first bit of your question: root has all permissions on
every file irrespective of its permission bits[0].

--
Avi

[0] *not* irrespective of its filesystem attributes, as set with
chattr

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-23-2012, 04:21 AM
Thufir
 
Default chmod 444 *

On Fri, 21 Sep 2012 16:02:04 -0500, William Scott Lockwood III wrote:

> Now do chattr +i

Ah, thanks, I was unaware of chattr.


-Thufir


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 12:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org