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 > Xubuntu User

 
 
LinkBack Thread Tools
 
Old 07-24-2012, 04:14 PM
Wybo Dekker
 
Default security problem?

When I create a file in my home directory as root:

$ sudo touch test

I get:

$ ls -l test
-rw-r--r-- 1 root root 0 2012-07-24 18:09 test

I cannot, without sudo, overwrite this file, but I can remove it with rm
-rf. Is that correct? And if not: how can I find out what's wrong with
my system?

--
Wybo

--
xubuntu-users mailing list
xubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/xubuntu-users
 
Old 07-30-2012, 01:50 AM
Sandy Harris
 
Default security problem?

On Wed, Jul 25, 2012 at 12:14 AM, Wybo Dekker <wybo@xs4all.nl> wrote:
> When I create a file in my home directory as root:
>
> $ sudo touch test
>
> I get:
>
> $ ls -l test
> -rw-r--r-- 1 root root 0 2012-07-24 18:09 test
>
> I cannot, without sudo, overwrite this file, but I can remove it with rm
> -rf. Is that correct? And if not: how can I find out what's wrong with
> my system?

rm does not change data inside the file, or the inode data that tells
the system where the file data is. It only changes the directory
info that associates a name with that inode number.

Therefore, for rm to work you need write access for the directory,
not for the file. This may be a bit counter-intuitive, but it has
been standard for any Unix variant since before I learned it in
the early 80s.

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

Thread Tools




All times are GMT. The time now is 10:03 AM.

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