Jan Engelhardt:
> >> 12:40 shanghai:/home/jengelh # mount lo:/home/Video /mnt -t nfs
> >> 12:40 shanghai:/home/jengelh # cd /mnt/
> >> 12:40 shanghai:/mnt # touch it
> >> touch: cannot touch `it': Read-only file system
        :::
> >Can you "touch it" on nfs server locally?
> 
> Well yes :)

I have tried on linux-2.6.13.2, and got EACCES from open(2).
But I tried as superuser and got EROFS from utime(2).
----------------------------------------------------------------------
jroun:~$ grep /ext2 /etc/exports
/ext2           xxx.xxx.xxx.xxx(ro,async,no_root_squash)
jroun:~$ sudo mount jroun:/ext2 /mnt
jroun:~$ strace -e trace=file touch /mnt/file
        :::
open("/mnt/file", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 
EACCES (Permission denied)
utime("/mnt/file", NULL)                = -1 ENOENT (No such file or directory)
touch: cannot touch `/mnt/file': Permission denied

jroun:~$ sudo strace -e trace=file touch /mnt/file
        :::
open("/mnt/file", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 
EACCES (Permission denied)
utime("/mnt/file", NULL)                = -1 EROFS (Read-only file system)
touch: cannot touch `/mnt/file': Permission denied
----------------------------------------------------------------------

I guess your open(2) acts like what I wrote.
You might be confused by your touch command's error message.

$ touch --version
touch (coreutils) 5.2.1


Junjiro Okajima
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to