By simonsays87
very basic question:
I have apache set up on a ubuntu droplet. created a newuser, gave him root access. when I log in as newuser through ssh/sftp I need to be able to upload files to /var/www but I dont have permission. How would I give newuser permission to upload and delete from that folder so I can actually put web pages up?
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!
There is no point of giving a user the root privileges, but to increase the risk to get your web server hacked easily… <br> <br>you need to give a user some privileges so that if the user got hacked, it is still safe to avoid high risk of breaking into your server. <br> <br>for what you are up to, read this and be careful when giving permission to user: <br> <br>http://stackoverflow.com/questions/3740152/how-to-set-chmod-for-a-folder-and-all-of-its-subfolders-and-files-in-linux-ubunt
thanks! <br> <br>so what I have now is: <br>1. root user. not used <br>2. admin account with root privileges. this is the main account i will use to admin tasks <br>3. web account which I have assigned to the www-data group and given him/the group permission to read/write to /var/www. this is the main account i will use to do ftp tasks <br> <br>is this typically how user accounts are structured on servers? very new to webservers so still trying to figure out the correct things to do
That looks proper :] You might want to use sftp instead of ftp as it is much more secure: <a href=“https://www.digitalocean.com/community/articles/how-to-use-filezilla-to-transfer-and-manage-files-securely-on-your-vps”>https://www.digitalocean.com/community/articles/how-to-use-filezilla-to-transfer-and-manage-files-securely-on-your-vps</a>.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.