Copy files from read only fs as writable
Mike McCarty
mike.mccarty at sbcglobal.net
Tue Jan 17 06:04:26 UTC 2006
Tim wrote:
> On Mon, 2006-01-16 at 22:37 -0600, Jonathan Berry wrote:
>
>
>>Is there a way that I can make files from a read only file system copy
>>over as writable? I have an NTFS partition (I think the same thing
>>happens with, say, a CD) mounted read only and whenever I copy files
>>over from it, they are given permissions that exclude the write bit.
>
>
> Hmm, I hadn't really noticed that before, but it does (I've not got NTFS
> to test with, but just tried it from a CD-ROM).
>
>
>>This is mostly just annoying, but I was wondering if there was some
>>way to have it automatically set the user writable bit when copying it
>>over. Preferably a mount option so that it just works. Any ideas?
>
>
> I'd imagine it'd have to be mounted as writable to work in the manner
> that you hope (I can never remember, for sure, if umask options in fstab
> lets you clear or set permissions, I think it clears masked bits). I
> suppose you could make a script that did a copy then a chmod on files,
> and use that instead of directly using the cp command.
>
> I have a slightly different annoyance that I haven't resolved: All
> files on a CD are mounted as executable. I don't want that, it brings
Not on my machine, they aren't. Hmm. That's interesting.
Here's my fstab entry... (edited for space)
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,user,kudzu,exec,ro 0 0
It indeed mounts as RO, but not X.
> about problems. If I only ever mounted ISO9660 discs I could change my
> fstab configuration to resolve that (looking at what options are
> available to me in the man file about this - mode presetting), but I
> also mount UDF discs, and the option isn't compatible (for a single
> fstab line mounting discs in either format, automatically). Mounting
> them no-exec doesn't help.
Hmm. Odd. I run FC2, perhaps something changed?
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
More information about the fedora-list
mailing list