developer-portal / content

Content for the Fedora Developer Portal
https://developer.fedoraproject.org/
GNU General Public License v2.0
107 stars 253 forks source link

: vagrant vagrant-nfs.md sudoers configuration does not work (anymore) #495

Closed martinclauss closed 11 months ago

martinclauss commented 11 months ago

Hey there! :wave:

The /etc/sudoers configuration from here does not work (anymore). The instructions from here work fine: https://developer.hashicorp.com/vagrant/docs/synced-folders/nfs#root-privilege-requirement

Cmnd_Alias VAGRANT_EXPORTS_CHOWN = /bin/chown 0\:0 /tmp/vagrant-exports
Cmnd_Alias VAGRANT_EXPORTS_MV = /bin/mv -f /tmp/vagrant-exports /etc/exports
Cmnd_Alias VAGRANT_NFSD_CHECK = /usr/bin/systemctl status --no-pager nfs-server.service
Cmnd_Alias VAGRANT_NFSD_START = /usr/bin/systemctl start nfs-server.service
Cmnd_Alias VAGRANT_NFSD_APPLY = /usr/sbin/exportfs -ar
%vagrant ALL=(root) NOPASSWD: VAGRANT_EXPORTS_CHOWN, VAGRANT_EXPORTS_MV, VAGRANT_NFSD_CHECK, VAGRANT_NFSD_START, VAGRANT_NFSD_APPLY

Tested on Fedora 39.

Thanks! :heart:

jackorp commented 11 months ago

Thanks for the report and verifying a working way. Looks like vagrant is using a new way to manage the exports.