s@s-desktop:~/home/work$ sudo chmod +x tftp-script.sh
s@s-desktop:~/home/work$ sh tftp-script.sh
*********************************************************************************
WELCOME TO RUGGED BOARD
*********************************************************************************
mkdir: cannot create directory ‘/var/lib/tftpboot’: Permission denied
chmod: cannot access '/var/lib/tftpboot': No such file or directory
chown: cannot access '/var/lib/tftpboot': No such file or directory
tftp-script.sh: 13: tftp-script.sh: cannot create /etc/xinetd.d/tftp: Permission denied
mkdir: cannot create directory ‘/nfsroot’: Permission denied
tftp-script.sh: 34: tftp-script.sh: cannot create /etc/exports: Permission denied
exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 13 (Permission denied)
exportfs: can't lock /var/lib/nfs/etab for writing
[ ok ] Restarting nfs-kernel-server (via systemctl): nfs-kernel-server.service.
******************************************************************************************
TFTP & NFS SETUP has been done
once try with below commands
sudo su
sh tftp-script.sh
I think you are using wrong script. Can you please share the link from where you have downloaded it.
i am using ubunty 18.04.3
i tried this the it is getting like :
stability@stability-desktop:~$ cd home
stability@stability-desktop:~/home$ cd work
stability@stability-desktop:~/home/work$ sudo su stability
[sudo] password for stability:
stability@stability-desktop:~/home/work$ sh tftp-script.sh
*********************************************************************************
WELCOME TO RUGGED BOARD
*********************************************************************************
mkdir: cannot create directory ‘/var/lib/tftpboot’: Permission denied
chmod: cannot access '/var/lib/tftpboot': No such file or directory
chown: cannot access '/var/lib/tftpboot': No such file or directory
tftp-script.sh: 13: tftp-script.sh: cannot create /etc/xinetd.d/tftp: Permission denied
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'xinetd.service'.
Authenticating as: stability,,, (stability)
Password:
==== AUTHENTICATION COMPLETE ===
mkdir: cannot create directory ‘/nfsroot’: Permission denied
tftp-script.sh: 34: tftp-script.sh: cannot create /etc/exports: Permission denied
exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 13 (Permission denied)
exportfs: can't lock /var/lib/nfs/etab for writing
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'xinetd.service'.
Authenticating as: stability,,, (stability)
Password:
==== AUTHENTICATION COMPLETE ===
[....] Restarting nfs-kernel-server (via systemctl): nfs-kernel-server.service==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'nfs-server.service'.
Authenticating as: stability,,, (stability)
Password:
==== AUTHENTICATION COMPLETE ===
. ok
******************************************************************************************
TFTP & NFS SETUP has been done
*******************************************************************************************
Which OS are you using? I am assuming that you are using Ubuntu OS. In that case please type "sudo su" follows by your password to enter to super user. Then try the tftp command to execute the TFTP server.