[CentOS] FW: Permissions issue

Jason Pyeron jpyeron at pdinc.us
Thu Nov 11 12:47:49 EST 2010


I am at loss on this mysterious file permission issue. I cannot move the file
out of the directory, but I can rename it. I cannot read the file.
It is not open by any processes, the filesystem is in read write mode. I am
logged in as root.

-Jason 

[root at localhost /]# tar cvzf ~/named.201011111228.tgz --one-file-system
/etc/named.conf /var/named/
tar: Removing leading `/' from member names
/etc/named.conf
/var/named/
/var/named/data/
/var/named/lost+found/
/var/named/slaves/
tar: /var/named/backup.tgz: Cannot open: Permission denied
/var/named/chroot/
/var/named/chroot/etc/
/var/named/chroot/etc/named.caching-nameserver.conf
<snip/>
tar: Error exit delayed from previous errors
[root at localhost /]# dir /var/named/backup.tgz
-rw------- 1 root root 6651 Nov 11 11:32 /var/named/backup.tgz
[root at localhost /]# stat /var/named/backup.tgz
  File: `/var/named/backup.tgz'
  Size: 6651            Blocks: 24         IO Block: 4096   regular file
Device: fd04h/64772d    Inode: 98312       Links: 1
Access: (0600/-rw-------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2010-11-11 12:28:33.000000000 -0500
Modify: 2010-11-11 11:32:03.000000000 -0500
Change: 2010-11-11 11:32:03.000000000 -0500
[root at localhost /]# mv /var/named/backup.tgz ~
mv: cannot open `/var/named/backup.tgz' for reading: Permission denied
[root at localhost /]# chmod 777 /var/named/backup.tgz
[root at localhost /]# mv /var/named/backup.tgz ~
mv: cannot open `/var/named/backup.tgz' for reading: Permission denied
[root at localhost /]# getfacl /var/named/backup.tgz
getfacl: Removing leading '/' from absolute path names
# file: var/named/backup.tgz
# owner: root
# group: root
user::rwx
group::rwx
other::rwx

[root at localhost /]# dir /var/named/backup.tgz
-rwxrwxrwx 1 root root 6651 Nov 11 11:32 /var/named/backup.tgz
[root at localhost /]# setfacl -b /var/named/backup.tgz
[root at localhost /]# dir /var/named/backup.tgz
-rwxrwxrwx 1 root root 6651 Nov 11 11:32 /var/named/backup.tgz
[root at localhost /]# getfacl /var/named/backup.tgz
getfacl: Removing leading '/' from absolute path names
# file: var/named/backup.tgz
# owner: root
# group: root
user::rwx
group::rwx
other::rwx

[root at localhost /]# mv /var/named/backup.tgz ~
mv: cannot open `/var/named/backup.tgz' for reading: Permission denied
[root at localhost /]# mount
<redact>
No readonly mounts
</redact>
[root at localhost /]# df -h
<redact>
Each filessytem has plenty of free space
</redact>
[root at localhost /]# dir /var/named/
total 72
drwxr-x---  6 root  named  4096 Nov 11 11:32 .
drwxr-xr-x 24 root  root   4096 Apr  1  2010 ..
-rwxrwxrwx  1 root  root   6651 Nov 11 11:32 backup.tgz
drwxr-x---  6 root  named  4096 Nov 11 11:48 chroot
drwxrwx---  2 named named  4096 Jan 18  2010 data
drwx------  2 root  named 16384 Feb  4  2009 lost+found
drwxrwx---  2 named named  4096 Jan 18  2010 slaves
[root at localhost named]# /etc/init.d/named stop
Stopping named: .                                          [  OK  ]
[root at localhost named]# mv backup.tgz foo
[root at localhost named]# mv foo backup.tgz
[root at localhost named]# mv backup.tgz ~
mv: cannot open `backup.tgz' for reading: Permission denied
[root at localhost named]# lsof | grep backup.tgz
[root at localhost named]# 

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.





More information about the CentOS mailing list