Re: Copy files from read only fs as writable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/16/06, Tim <ignored_mailbox@xxxxxxxxxxxx> 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

Yes, umask lets you clear bits.  Setting the w bit for files on a read
only filesystem does seem rather unintuitive and isn't really what I
want.  This is my logic: if I'm copying a file, I just wrote the copy,
so why should the copied version be read only at that point?

> 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.

Yeah, but like I just replied to Mike, I might want to use some other
means of copying that wouldn't utilize such a script.

> 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
> 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.

Well, can you split the line off into an iso9660 and udf line?  Looks
like you could use that mode setting for the iso and looks like udf
has a umask option.  Why this kind of thing isn't standardized such
that every fs type has the same options available for use, I don't
know.  Or at least some standard subset of options.  Something like
umask seems like it should be fairly straight forward.

Jonathan


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux