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

  • Posted October 31, 2013

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
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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/

Using terminal yes that’s possible, but there’s two factors there. <br> <br>1. I’m in /home/user/ <br>2. I’m using terminal rather than ftp app like transmit <br> <br>The reason I want to use SFTP is because I do a lot of work with Expression Engine and need to be able to just upload files. <br> <br>Could I just put my domain folders that are being pointed at in /home/user/domain etc, if so is that a complicated task changing where things point to. I’m fairly new to all of this.

So <code>sudo mkdir ~/test</code> does not work for you? <br> <br>Have you tried rebooting your droplet? <br> <br>Remember that with Linux, names are case sensitive.

Followed the steps to the letter, and already added user ALL=(ALL:ALL) ALL to the above, still causing me some issues.

sudo nano /etc/sudoers <br>add your username <br>done

And even if you have implemented step four you still need to run the command with ‘sudo’ in order to gain root privileges. <br>ex. <br>#sudo mv directory /home/user/targetdirectory <br>#sudo shutdown -h now

Did you implement <b>Step Four</b> of <a href=“”>Initial Server Setup with Ubuntu 12.04</a>?