--- Begin Message ---
Subject: |
Changing File permission of files owned by root |
Date: |
Tue, 13 Mar 2012 18:35:41 +0530 |
Hi,
I found a bug (or say lack of functionality) in chmod. I tried to change the permission of a file (normal .txt file) owned by root using:
sudo chmod -x file.txt
It returned silent prompt but the file permissions were unchanged. I tried the same with logging in as root and again hit:
chmod -x file.txt
Again the shell returned silent prompt, but the permissions were unchanged.
I think there is some issues within the kernel. If you know anything relevant please reply.
--
Regards
Nikhil Vidhani
Indian Institute of Science
Bangalore, India
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#11009: Changing File permission of files owned by root |
Date: |
Tue, 13 Mar 2012 16:34:54 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
tags 11009 notabug
On 03/13/2012 01:05 PM, Nikhil Vidhani wrote:
> Hi,
>
> I found a bug (or say lack of functionality) in chmod. I tried to change
> the permission of a file (normal .txt file) owned by root using:
>
> sudo chmod -x file.txt
>
> It returned silent prompt but the file permissions were unchanged. I tried
> the same with logging in as root and again hit:
>
> chmod -x file.txt
>
> Again the shell returned silent prompt, but the permissions were unchanged.
>
> I think there is some issues within the kernel. If you know anything
> relevant please reply.
The key words theyre are "within the kernel".
So I'm closing this as not a coreutils issue.
You could confirm that with strace.
If you see fchmod() or fchmodat() passing the
correct params and returning 0, the "issue"
is in the kernel.
What I'm guessing might be happening is that
you're doing this on a fat file system or
similar which doesn't represent all the
unix file persmissions.
cheers,
Pádraig.
--- End Message ---