Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error chown: invalid group: ‘nobody:nogroup’ while setting up an NFS server drive ownership permission

I am following this tutorial to export an NFS share drive.

https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-16-04#step-2-%E2%80%94-creating-the-share-directories-on-the-host

I use centos7 as os.

In tutorial, below given statement given.

sudo chown nobody:nogroup /var/nfs/general

When I run the statement, followng error occurs!

chown: invalid group: ‘nobody:nogroup’

I also check /etc/group to understand if there is any group such as nogroup. And, It seems It does not exists. Following command return empty list.

cat /etc/group | grep nogroup

I have tried nobody instead of nogroup as below and it worked!

sudo chown nobody:nobody /var/nfs/general

Is the tutorial outdated. Should I use nobody instead of nogroup. Maybe some configuration missing on the system. What is the best practice for centos7. Please let me know!

thanks in advance!

like image 301
clockworks Avatar asked Nov 01 '25 04:11

clockworks


2 Answers

sudo chown -R nobody:nogroup /var/lib/tftpboot

this is work me on ubuntu server

like image 199
yunusemredemirbas Avatar answered Nov 02 '25 22:11

yunusemredemirbas


The tutorial in the question is for ubuntu. I am working on centos. I realized and I fixed the issue as below.

sudo chown nfsnobody:nfsnobody /exports/test/

The tutorial where I found the command.

https://www.howtoforge.com/tutorial/setting-up-an-nfs-server-and-client-on-centos-7/

like image 33
clockworks Avatar answered Nov 03 '25 00:11

clockworks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!