CentOS SFTP Access Permissions

Posted April 24, 2016 3k views
CentOSSystem ToolsLEMPApplicationsLet's Encrypt

I think I am having some sort of permissions issues and I am not sure.

Just created my first droplet ever and the steps below are what I have done so far.

Configured SSH Keypair/Access
Created user and added to sudoers
Disabled root logins
Configured firewall to allow http, https, and ssh access
Installed LEMP stack
(Tried to configure Lets Encrypt, but failed. That is another problem for later)

The LEMP stack is functioning correctly and I have access to everything, but when I connect via SFTP using WinSCP I am unable to delete the default index.html file for nginx. Nor am I able to upload any new documents. (I am not using root, I am using the new profile I created and added to sudoers)

I think this may be a permissions issues, but I am not sure?

Thanks :D

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.

Submit an Answer
1 answer

This does sound like a permissions issue. The files in the default web root when using nginx will be owned by user and group nginx. You can change the ownership of these files to the new user you created (but nginx may not be able to write new files if this is needed) or you can add your new user to the nginx group.

  • Ryan,

    I added my user to the “nginx” group and I am still unable to make changes to those files.

    I thought this would fix, but it must be something else causing it.