LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-02-2011, 06:34 AM   #1
dhamilton
LQ Newbie
 
Registered: Dec 2010
Posts: 4

Rep: Reputation: 0
Cannot copy file even as root (read permission denied)


I am attempting to make a backup copy of a file, but every time I try to copy the file, I get a "permission denied error -- even when running as root.

The file is on a volume mounted as /media/Data . No problems reading/writing other files on the volume.

Here is the info on the file:
-rw-------. 1 root MailServer.img
I've tried chown but get the permission denied as well. This is a virtual machine image that runs fine, but even with the VM completely shut down, I get the same error.

Any ideas?

Thanks,

David
 
Old 01-02-2011, 07:03 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Please give the full ls -l MailServer.img output and getfacl MailServer.img output.
 
Old 01-02-2011, 07:23 AM   #3
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Rep: Reputation: 115Reputation: 115
Also post the permissions/ownership on the source directory (and dest if not the same).
 
Old 01-02-2011, 07:34 AM   #4
dhamilton
LQ Newbie
 
Registered: Dec 2010
Posts: 4

Original Poster
Rep: Reputation: 0
As requested:
From ls -l
-rw-------. 1 root root 697932185600 Jan 2 07:26 MailServer.img

from getfacl
# file: MailServer.img
# owner: root
# group: root
user::rw-
group::---
other::---
 
Old 01-02-2011, 07:52 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Thanks for the requested outputs

If ls -l works on the file then the containing directory's permissions should not affect copying the file.

I don't understand the . after the permissions list in
Code:
-rw-------. 1 root root 697932185600 Jan 2 07:26 MailServer.img
Could it be significant?

Not working on any theories, just collecting information: what is the stat MailServer.img output?
 
Old 01-02-2011, 08:04 AM   #6
dhamilton
LQ Newbie
 
Registered: Dec 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Stat output:
File: `MailServer.img'
Size: 697932185600 Blocks: 31073632 IO Block: 4096 regular file
Device: 811h/2065d Inode: 12 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2011-01-02 07:54:51.182361231 -0600
Modify: 2011-01-02 07:55:44.630400628 -0600
Change: 2011-01-02 07:56:41.261361047 -0600
 
Old 01-02-2011, 09:14 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
No clues there. Because you wrote "No problems reading/writing other files on the volume" we have no reason to suspect the mount options. Might be worth running strace cp MailServer.img /dev/null for more (some!) clues or running fsck on the file system.
 
Old 01-03-2011, 02:31 PM   #8
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 666

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by catkin View Post
Thanks for the requested outputs

If ls -l works on the file then the containing directory's permissions should not affect copying the file.

I don't understand the . after the permissions list in
Code:
-rw-------. 1 root root 697932185600 Jan 2 07:26 MailServer.img
Could it be significant?
@catkin: "." mean that file has at least one acl set.
@OP: this directory is not NFS-mounted by any chance?

Last edited by Valery Reznic; 01-03-2011 at 10:14 PM.
 
1 members found this post helpful.
Old 01-03-2011, 05:45 PM   #9
Bull3t
Member
 
Registered: Aug 2010
Posts: 55

Rep: Reputation: 0
I had problems copying and pasting files that were in a Win32 format on a drive of mine. To solve this problem I plugged it into a Windows machine, changed the permissions to Everyone and then it worked like a charm. That may help.
 
Old 01-03-2011, 11:14 PM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Valery Reznic View Post
@catkin: "." mean that file has at least one acl set.
@OP: this directory is not NFS-mounted by any chance?
Thanks Valery

Good to learn about that ".". How does the presence of the . correlate with the gatfacl output in post #4 of this thread which looks the same as getfacl output on a system with no ACLs (I do not have a system with ACLs to test how it would look if ACL(s) were present).

Regards NFS, as long as dhamilton's "No problems reading/writing other files on the volume" is reliable do we have any reason to suspect that the problem lies at file system level? Whatever the problem is caused by it seems to be specific to this file. Clearly the file can be read or the VM that uses it would not run. That suggests something fine-grained like an ACL or the NTFS permissions that Bull3t wrote about.

Last edited by catkin; 01-03-2011 at 11:18 PM. Reason: added refernce to Bull3t's information
 
Old 01-04-2011, 07:59 AM   #11
imagine_me2
Member
 
Registered: Nov 2009
Location: Kolkata, India
Distribution: Fedora 11
Posts: 136

Rep: Reputation: 22
I guess the VM might not be completely out of memory. Do a ps aux and confirm no VM processes are running. Then again repeat the chown/chmod commands and try copying. If u want to do a little testing create a dummy VM image and try copying it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Try to use tcpdump to read TEST file, but get permission denied. zetareticular Linux - Newbie 4 10-23-2010 11:13 AM
cp read permission denied wolfgang_b Linux - Newbie 3 09-30-2009 12:14 PM
DD copy reports permission denied error speedfreq Linux - Hardware 6 09-23-2009 06:30 PM
Debian on VBox Read Only File System and Permission Denied Errors The Konqi Kid Debian 5 03-04-2008 05:07 PM
root permission denied xmaspie Linux - Newbie 2 11-05-2003 01:05 PM


All times are GMT -5. The time now is 07:53 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration