bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11709: allows the user to modify the file when no access is given


From: Bob Proulx
Subject: bug#11709: allows the user to modify the file when no access is given
Date: Fri, 15 Jun 2012 14:26:32 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Vai Dy wrote:
>     It seems to bug in the following scenario.

For future discussion please use the address@hidden mailing list
for discussion.  This mailing list is for bug reports and creates a
new bug ticket to track bugs with every new message.  But since you
are mostly asking questions for understanding and not reporting bugs
that would be much better done on the discussion list so that we don't
keep having extra bug tickets.  Discussion on the discussion list is
better and then if something does turn out to be a bug then we can
open a bug ticket for it.  Thanks!

>    - created directory
>    - Inside directory created a file with no access to users ,groups and
>    owners.
>    - I logged into Linux machine as a user.

Linux is a kernel and not an operating system.  You cannot have logged
into a kernel.  Please say instead the operating system that you are
using.  But most important is the version of the coreutils program you
are talking about.  You can get the version from the program.

  $ ls --version
Or:
  $ cat --version
And so on for any of the commands.

>    - from root if try to modify the file ext, it allows me to do even
>    though no access is given to anyone. i used mv command here. It modified
>    successfully.

The root user is the "Superuser" on the system.  Without talking about
other variations the superuser is not restricted by file permissions.
Only normal users are restricted by file permissions.

>    - When i try to view the file from root with the help of cat , it says
>    permission denied.

You said 'cat' here but your example did not contain it.

> E.g;
> mkdir dir1
> dir1: touch file1
> dir1: chmod oug=  file1(No access is given)
> dir1: ls -l
> ----------- 1 xx yy 0 2012 -06-14 8.23  file1
> cd dir1
> dir1: mv file1 file.ksh
> 
> Please clarify the above .

As Pádraig said the permissions of the file have nothing to do with
the permissions of the directory.  Moving the file is a directory
operation.  It does not affect the contents of the file.  It affects
the contents of the directory.

Bob





reply via email to

[Prev in Thread] Current Thread [Next in Thread]