Report this

What is the reason for this report?

How to access the "www"-folder on my machine via sFTP

Posted on March 21, 2014

Hello :) I’m new to the whole server world and usually just transfered my files via FTP to the server. With the great tutorials on digitalocean I managed to setup a LEMP server with cakephp.

This is great, though I’m curious, how would I create access to the “/usr/share/nginx/www” folder on my machine via ftp? I managed to connect with FileZilla to my server, though I end up in my user-folder “/home/USERNAME/files” :/

I’m thankful for every kind of information to help me understand this new world :)



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!

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.

Change the directory you are in try to browse to “/”. Also look for the “…” folder at the top of list of folders, double click to go up 1 folder level, repeat as needed to reach “/”

I can only access the user-folder and the “files”-folder. Clicking on the “…”-folder doesn’t do anything :/

looks like you have created a custom user. <br> <br>now you need to be sure about giving permissions to this user. <br> <br>did you follow this tut: <br>https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04 <br> <br>you need to be sure to give the user some permissions to access your WS. <br> <br>if you are done, then you will be able to go through the whole WS tree to see all listed files and folders. <br> <br>to give your user a permission to a folder do this: <br> <br>sudo chown -R my-user:www-data /folder-name <br> <br>///explanation:/// <br>------------------------- <br>my-user: is the user you want to give permision, <br>www-data: is the group your user belong to. <br> <br>you can use it like this: sudo chown -R youruser:youruser /folder-name <br> <br>then enter this command: <br> <br>sudo chmod -R 0755 /folder-name <br> <br>///explanation:/// <br>------------------------- <br>here you will give the permission to the user to access the folder(s) with writing + reading + executing <br> <br>Important, you need to be careful where to use these commands!! <br> <br>if I were in your situation,I will do this: <br> <br>I will give permission to user to this folder only: www <br> <br>so I have to go inside the folder with puTTY or DO console --> <br> <br>cd /usr/share/nginx <br> <br>it will be like this: <br> <br>user@yourhostname: /usr/share/nginx$ <br>then I can enter the command like this: <br> <br>sudo chown -R my-user:my-user ./www <br> <br>Then this command: <br> <br>sudo chmod -R 0755 ./www <br> <br>and you’re done! <br> <br>Good luck!!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.