Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is my first time working with NFS but I fail to see what the issue is since everything works properly.
On the server (CentOS 5.5, virtualized), /etc/exports has
Quote:
/home/share 192.168.0.0/16 *(rw, sync)
I've exported the file using
Quote:
exportfs -ra
Then mounting it from the client with
Quote:
sudo mount 192.168.2.105:/home/share /mnt/nfs
It mounts perfectly fine but I can't write to the mounted NFS partition.
Everytime I try "touch t", I get touch:
Quote:
cannot touch `t': Read-only file system
Anyone knows how I can mount this in a manner where I can write to the mount? Also, if I had explicitly mentioned that the partition is to be mounted as rw, why is this happening?
BTW, showmount -e 192.168.2.105 shows the proper value, namely,
Quote:
showmount -e 192.168.2.105
Export list for 192.168.2.105:
/home/share (everyone)
[root@centos01 ~]# exportfs -v
/home/share 192.168.0.0/16(ro,wdelay,root_squash,no_subtree_check,anonuid=65534,anongid=65534)
/home/share <world>(rw,wdelay,no_root_squash,no_subtree_check,anonuid=65534,anongid=65534)
[root@centos01 ~]# mount
/dev/sda5 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda3 on /home type ext3 (rw)
/dev/sda1 on /boot type ext2 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
client:
Quote:
[steve@steve-laptop:~]$ mount (01-21 12:17)
/dev/sda3 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
gvfs-fuse-daemon on /home/steve/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=steve)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
mount
/dev/sda3 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
gvfs-fuse-daemon on /home/steve/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=steve)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
192.168.2.105:/home/share on /mnt/nfs type nfs (rw,addr=192.168.2.105)
I didn't realize that! Yes my client is in the 192.168.0.0/16 subnet. How would I go about solving this? As you can see from the original post, its set to rw.
if you do not want people outside your subnet to connect. And set permissions to /home/share that user with id=65534 which is usualy "nobody" has write permission, for example
Code:
chmod 777 /home/share
if you don't need special security. Or change anonuid option in exports file to other user id.
Changed the folder privileges to 777, mounted, unmounted and tried again and still won't write to the share. Checking from the client, ls -al gives me:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.