Bug 592883 - can not edit files on images mounted with guestmount cmd
can not edit files on images mounted with guestmount cmd
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On: 501889
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-17 06:05 EDT by Pengzhen Cao
Modified: 2011-07-14 15:08 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-14 15:08:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
guestmount logs (10.76 KB, text/plain)
2010-05-17 06:05 EDT, Pengzhen Cao
no flags Details

  None (edit)
Description Pengzhen Cao 2010-05-17 06:05:40 EDT
Created attachment 414504 [details]
guestmount logs

Description of problem:
Can not edit the content of files mounted with guestmount cmd

Version-Release number of selected component (if applicable):
libguestfs-mount-1.2.3-1.fc12.6.x86_64, 
latest git version v1.3.13

How reproducible:
100%

Steps to Reproduce:
1. create a blank image with guestfish
2. create several ascii files on it
3. mount the image with guestmount cmd, e.g.:
guestmount -a /home/libguestfs-test/test.img -n -m /dev/sda1 /home/pcao/mnt  --trace
4. using vi to create a new file or edit an existing file on "/home/pcao/mnt"
  
Actual results:
file can not be changed and got read-only error.

Expected results:
file should be changed

Additional info:
cp a file from host to the mount point , and echo sth to a file can not work either.
However, truncate , chmod, ln could work.
Comment 1 Richard W.M. Jones 2010-05-17 06:20:27 EDT
I forgot about this, but it's just that we didn't implement the 'write' syscall:

http://git.annexia.org/?p=libguestfs.git;a=blob;f=fuse/guestmount.c;h=27a4cef2e149027b06cefbfadf89ab64c4de4bc7;hb=HEAD#l649

So while in theory this is a simple fix, in fact it's a little more complex than
that because it requires bug 501889 to be fixed first, and that requires some
changes to the generator (see discussion of BufferIn in the TODO file here:
http://libguestfs.org/TODO.txt )

Note You need to log in before you can comment on or make changes to this bug.