liximomo / vscode-remote-fs

Working with any file in everywhere with vscode.
MIT License
166 stars 17 forks source link

How to set up super user (sudo)? #15

Open intmash opened 6 years ago

intmash commented 6 years ago

Hi! Many thanks! Now i can see my sourses by SFTP at RaspberryPi. But i can't create direcrories and files and write them. I'm using WinSCP (SFTP - client). For make possible the write operations, i set up Protocol Option->SFTP server = "sudo su -c /usr/lib/sftp-server" (the WinSCP advansed settings) after that WinSCP can do create/write-file operations.

With RemoteFS i can't do create/write-file operation (i get error message "...no permissions"), please teach me how do that.

liximomo commented 6 years ago

You may put sudo su -c /usr/lib/sftp-server in your ~/.bash_profile or ~/.bash_login on remote.

intmash commented 6 years ago

Hi! i changed owner (user pi) (sftp server is running)

RemoteFS can't do create/write files operations if folder was created by ROOT

pi@raspberrypi:~/nodejsprojects $ ls -al
drwxr-xr-x  7 pi root 4096 Jun 20 05:52 snake

The snaket - folder is ROOT, and RemoteFS will not write changes to it.

For resolve the problem, i do: pi@raspberrypi:~/nodejsprojects $ sudo chown pi:pi * and test the changes

pi@raspberrypi:~/nodejsprojects $ ls -all
...
drwxr-xr-x  7 pi pi 4096 Jun 20 05:52 snake

Now, the owner of snake-folder is pi user, and RemoteFS is working to write files and create subfolders inside this (snake) folder