Configure user vsftpd in a specific directory

Hello friends!

I am beginner and installed the LAMP package in Ubuntu, but I can not make the following settings:

I created a user named “oregon” and want to access SFTP with it, but I need that he has as root directory** /var/www** because I will publish your site files in /var/www/html. Also not want him to see above directories and preference.

Already asked for help in supporting and read the tutorials, but could not solve :(

Every moment is a different problem, I can never complete this setting, please help me.

Show comments

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.

You can’t or you can? It sounds like you can. Anyway, it seems that you got a permissions problem now. You can check it with:

ls -l /var/www

You can read more about them here: FilePermissions I believe that apache (www-data) isn’t the owner of your html directory, and your user isn’t in this group either, thus you need to allow “Others” to read and execute or no one will be able to access the site. The classic permissions for sites are 755 for folders and 644 for files.

P.s.: Accidentally posted this as an answer instead of a reply to your new answer. Dang.



I tested your tip and now can not send files to the server, the only problem is that no page or directory is accessible, to make the browser via access displays the following message:


You don’t have permission to access / on this server.

Apache/2.4.7 (Ubuntu) Server at Port 80

@Woet I am a novice, do not know what I’m doing. What do I need at the moment is: access the FTP or SFTP with the user created. As you would with handles sshd SFTP?

@redraenhys Thank you, I will perform this procedure when I was at home.