[TriLUG] non-root partial view of file?

Kevin Hunter Kesling hunteke at earlham.edu
Fri Jan 16 22:43:07 EST 2015


At 10:10am -0500 Fri, 16 Jan 2015, Igor Partola wrote:
> What Bill said. The answer may be as simple as "the mount command
> lets you mount a volume over any path in the FS, including /bin,
> which would be bad". Perhaps, though I have no direct knowledge of
> this, mount cannot be written with file permissions in mind because
> it's used at some lower level where these things don't exist yet. Or
> perhaps it's not user permissions aware for legacy reasons.

I think perhaps I wasn't clear with my question.  Let me try again: I'm 
aware that mount is a potentially dangerous command.  What I'm looking 
for is a method to manipulate the disk image that does *not* require 
special privileges (ergo, no mount, since it requires root).

Another (related) example of where I think root should _not_ be 
necessary: creating a disk image.  If I were so inclined, I /could/ 
write a string of 0's and 1's to a file, which just so happened to match 
the output of creating a disk image through more conventional tools. 
But if I were to use the conventional tools (e.g., dd, truncate, parted, 
losetup, mkfs, mount), my current knowledge of *nix systems would 
require root access -- even though I'm merely manipulating a file 
created and owned by a non-root user.  I want to avoid this.

Bill directed me to fuse, which may be the route I have to go.  I was 
hoping there was some trick or ready-made set of tools for this purpose, 
but perhaps there isn't.

Thanks much,

Kevin



More information about the TriLUG mailing list