Nginx

Having sudo access to /usr/sbin/nginx we can web server as root as access the filesystem (read and write) using root privileges.

Change the user in the nginx.conf file to root

New nginx.conf file

  • user will be root

  • the server will listen on 1338

  • the directory will be /

  • dav_methods allows us to use the PUT method to update files

  • autoindex allows up to browse the filesystem

Visit http://<IP>:1338 and view filesystem using the root user

Create add a new public key to roots authorized_keys file

Last updated