You are not logged in.

#1 2010-12-28 18:01:07

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Permissions error when copying files to my home directory [RE-SOLVED]

So I've got a backup CD with a bunch of stuff on it. I mount it in Rox and drag everything over to my home directory, and for 22 of the files I get Permission Denied errors. Try via the command line, cp -R also gives Permission Denied. This does not happen for any other files or any other CDs.

The fstab entry I'm using to mount the CD looks like this:

/dev/sr0 /media/cdrom auto noauto,user,ro 0 0

Needless to say the errors never make an appearance if I mount the CD using HAL/udisks/et crap. I tried adding umask=0 to the mount options, but that caused the CD to fail to mount ("bad superblock or error reading filesystem," or something like that).

What is going on here, and what's the workaround? I'm guessing it's something blindingly obvious, but I haven't caught on yet...

Last edited by Gullible Jones (2010-12-31 02:19:17)

Offline

#2 2010-12-28 18:02:59

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Can you not mount as root/sudo and see what the offending files are?

Last edited by Mr Green (2010-12-28 18:05:55)


Mr Green

Offline

#3 2010-12-28 18:06:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Permissions error when copying files to my home directory [RE-SOLVED]

What's so special about this CD? Have you burned it in a special way? Multisession?

Last edited by karol (2010-12-28 18:10:05)

Offline

#4 2010-12-28 18:09:18

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Permissions error when copying files to my home directory [RE-SOLVED]

I already know exactly which files are getting the errors, sorry if I didn't make that clear.

fstab definitely has it set to mount ro, yes.

I can't seem to get any real details on the permission error. The best I can get is

cp: cannot create regular file `/home/proteus/foo/bar.baz': Permission denied

Offline

#5 2010-12-28 18:11:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Permissions error when copying files to my home directory [RE-SOLVED]

What's so special about this CD? Have you burned it in a special way? Multisession?

Any errors in dmesg?

Offline

#6 2010-12-28 18:12:43

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Nothing special about the CD AFAIK. And no errors in dmesg.

What's really unusual IMO is that only some of the files on the CD give errors when I try to copy them. Most copy just fine.

Offline

#7 2010-12-28 18:18:33

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Permissions error when copying files to my home directory [RE-SOLVED]

well if file permissions [of files on cd] are root they are not going to copy, hence why I asked if you could mount as root/sudo

If I am teaching you how to suck eggs then I am sorry

MrG


Mr Green

Offline

#8 2010-12-28 18:23:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Mr Green wrote:

well if file permissions [of files on cd] are root they are not going to copy, hence why I asked if you could mount as root/sudo

If I am teaching you how to suck eggs then I am sorry

MrG

I don't think the fs on the CD can preserve file ownership.

Last edited by karol (2010-12-28 18:24:25)

Offline

#9 2010-12-28 18:36:30

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Hmm. You mean if they had the same permissions as the /root directory? I don't think that makes sense though, because the files were all owned by me when I burned the CD - I don't see how 22 of them could magically become owned by root. (Assuming the CD could preserve those permissions.)

(Also the permissions on the files that generate the error look exactly the same as on files that copy okay.)

Edit: I realize I could do the copying as root and change the permissions later, but this is obviously a problem with something I'm doing, so I'd like to solve that problem.

Last edited by Gullible Jones (2010-12-28 18:38:38)

Offline

#10 2010-12-28 18:39:07

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Other than cd is corrupt, got no idea

Did you try mounting cd as root/sudo ?


Mr Green

Offline

#11 2010-12-28 18:45:08

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Yes, that also produces errors. I'd think the CD was corrupt, only like I said the stuff all copies perfectly when it's mounted with HAL/udisks.

Offline

#12 2010-12-28 23:57:58

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Update... Reinstalled, it now works fine. Bizarre.

Offline

#13 2010-12-31 00:22:05

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Okay now we're getting somewhere... This happens on ext3 partitions but not JFS partitions. Maybe something to do with ACLs? Any takers?

Edit: Also just FWIW, the files can be read from the CD by my user just fine. They just can't be copied.

Last edited by Gullible Jones (2010-12-31 00:26:19)

Offline

#14 2010-12-31 02:20:03

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Aaand the solution:

*drumroll*

Enable write permissions on the directory I was copying the files to. Duh! Someone smack me please.

Offline

#15 2010-12-31 02:22:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Gullible Jones wrote:

Aaand the solution:

*drumroll*

Enable write permissions on the directory I was copying the files to. Duh! Someone smack me please.

This doesn't make much sense: you said some files got copied just fine. Were you coping into an existing directory structure?

Offline

#16 2010-12-31 05:14:30

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Permissions error when copying files to my home directory [RE-SOLVED]

Yes. The files in question weren't copying because I didn't have write permissions on the specific directory they were being copied to.

Offline

Board footer

Powered by FluxBB