Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
[nathanb@ka /x/sim/nathanb/nbsim1] ls -al ,nvram
-rw-r--r--    1 root     root      2097152 Jul  5  2011 ,nvram
[nathanb@ka /x/sim/nathanb/nbsim1] sudo chmod a+w ,nvram 
chmod: changing permissions of `,nvram': Operation not permitted

The volume is mounted rw, obviously, since I can modify other stuff. But even if I su as root, I can't chmod this file.

[root@ka /x/sim/nathanb/nbsim1] chmod +w ,nvram
chmod: changing permissions of `,nvram': Operation not permitted

I did an strace on the chmod, and I see this:

stat64(",nvram", {st_mode=S_IFREG|0644, st_size=2097152, ...}) = 0
chmod(",nvram", 0666)                   = -1 EPERM (Operation not permitted)

Here's the output of stat

[root@ka /x/sim/nathanb/nbsim1] stat ,nvram
Name: ,nvram             Size: 2097152       Perms: 0644/-rw-r--r--
Type: Regular File     Blocks: 4120           User: 0/root
Inode: 205777           IOsize: 32768         Group: 0/root

Access Time: Sat Jul 23 09:27:31 2011         Links: 1
Modify Time: Tue Jul  5 18:36:35 2011     FS device: 28
Change Time: Sat Jul 23 09:30:35 2011       Maj/Min: 0/0

And just to prove that there's not weird uid stuff going on:

[root@ka /x/sim/nathanb/nbsim1] id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),503(mailman),21(slocate),30(gopher),500(http),14(uucp),188(xelus),16(radadmin)

Any ideas?

share|improve this question
up vote 6 down vote accepted

You tagged this under /nfs.. If that file is on an NFS filesystem, you might need to export it on the server with no_root_squash to allow root on the clients to change the permissions on the file system.

share|improve this answer
I think you might be on to something. This may be difficult, because I don't really control the server or the client. But I suspect that nfs and root permissions are in fact the culprit here. Unfortunately since the files are owned by root I don't have much recourse other than trying to convince IT to do their jobs and change the files themselves. – Nathan Nov 2 '12 at 21:30
Because IT couldn't be bothered, I just created a new directory, copied all of the files owned by me, and then created a new ,nvram file and used dd to copy from the old one to the new one. Then I unlinked the old directory and put the new one in its place. Bam, problem solved. Thanks! – Nathan Nov 2 '12 at 22:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.