New 'user' doesn't have same permissions as 'root'

  • Posted on October 31, 2013
  • c.brettAsked by c.brett

I’ve followed the tutorial on setting up a LAMP stack on my VPS and it would seem the new user DOESN’T have the same privileges as root, therefore I’m not able to change and files, folders, create and new files or folders etc… any help much appreciated.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Check out <a href=“”>How To Use Filezilla to Transfer and Manage Files Securely on your VPS</a>. <br> <br>Also, make sure that your <code>/var/www</code> directory is owned by <code>www-data:www-data</code>; by executing, in a terminal, <br><pre>ls -la</pre> <br>If it’s anything but, execute: <br><pre>sudo chown -R www-data:www-data /var/www</pre> <br>Also, make sure that your user is part of the <code>www-data:www-data</code> group, by executing: <br><pre>sudo usermod -a -G www-data username</pre>

If you want to modify files in /var/www/domain, you can simple change its ownership to your user: <br><pre>sudo chown -R youruser:youruser /var/www</pre> <br>That will give your user write access to all of the directories/files in /var/www.

Just to add to above, currently my sites are in /var/www/domain/