Permission denied when editing .yaml thru WinSCP

It keeps saying permission denied when i try to edit my configuration.yaml file via WinSCP (using notepad++).

i end up just SSHing in and doing sudo nano…

How can i give WinSCP permission to edit the file?

Thanks for the help! ive only been here a few days and ive already gotten alot of help from this community :blush:

Use a different user to login your system, eg. ssh user@system. It depends on how the setup was done to select the user. Usually, it your user if you haven’t created one. Sorry can’t help with WinSCP but I guess that there is an input field for this.

Did you set up WinSCP as recommended for Pi (An1)?

Under the advanced tab

Environment
SCP/Shell
Shell select "sudo su - "

Works fine for me.

Calvin

3 Likes

Yep! thats exactly what i needed to do.

Thanks for the response!

Just use ssh or rmate/ssh

or a real OS :stuck_out_tongue:

I am having the same issues and changed the shell to “sudo su -” as suggested above but it still doesn’t allow me to edit the configuration.yaml file in WinSCP. I installed using the HASSbian image. Is there a username that is different for that install (and password as well)? Thanks for any insight. Standard login with Raspberry pi username and password isn’t working while editing or trying to change permissions on the configuration.yaml file.

stop, use nano or vim or atom or anything else.

I don’t use WinSCP for this but have in the past. I’m fairly sure you need to set the session protocol to SCP as well in the pull down menu on right hand side. Not home right now to check but used it on a router recently - see image.

2 Likes

That did it! I changed it to SCP and made some other changes in Advanced to get it to connect. Thanks.

What were the other changed settings. I have beent trying to solve this problem but cant. HA installed on venv with hass as user. I have tried the above recommendations. I am hoping i did not " muck up permissions!" What am i doing wrong?

Look at the image above

  1. Click “Edit”

  2. Click “Advanced”

  3. Environment

  4. SCP/Shell

  5. Shell select "sudo su - "

2 Likes