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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-02-2011, 06:34 AM
|
#1
|
|
LQ Newbie
Registered: Dec 2010
Posts: 4
Rep:
|
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
|
|
|
|
01-02-2011, 07:03 AM
|
#2
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
Please give the full ls -l MailServer.img output and getfacl MailServer.img output.
|
|
|
|
01-02-2011, 07:23 AM
|
#3
|
|
Member
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 527
Rep: 
|
Also post the permissions/ownership on the source directory (and dest if not the same).
|
|
|
|
01-02-2011, 07:34 AM
|
#4
|
|
LQ Newbie
Registered: Dec 2010
Posts: 4
Original Poster
Rep:
|
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::---
|
|
|
|
01-02-2011, 07:52 AM
|
#5
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
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?
|
|
|
|
01-02-2011, 08:04 AM
|
#6
|
|
LQ Newbie
Registered: Dec 2010
Posts: 4
Original Poster
Rep:
|
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
|
|
|
|
01-02-2011, 09:14 AM
|
#7
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
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.
|
|
|
|
01-03-2011, 02:31 PM
|
#8
|
|
ELF Statifier author
Registered: Oct 2007
Posts: 648
Rep: 
|
Quote:
Originally Posted by catkin
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.
|
01-03-2011, 05:45 PM
|
#9
|
|
Member
Registered: Aug 2010
Posts: 55
Rep:
|
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.
|
|
|
|
01-03-2011, 11:14 PM
|
#10
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
Quote:
Originally Posted by Valery Reznic
@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
|
|
|
|
01-04-2011, 07:59 AM
|
#11
|
|
Member
Registered: Nov 2009
Location: Kolkata, India
Distribution: Fedora 11
Posts: 136
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:08 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|