Portal Home > Knowledgebase > Articles Database > WinSCP and Sudo?


WinSCP and Sudo?




Posted by Urosino, 10-08-2011, 08:15 AM
When I login to SSH via Putty, I need to do sudo -i to gain full root access which is fine. But I would like to access all files and sub folders with WinSCP as well. If I login with my username I don't have permission to access all files on the server. Is there any workaround I would be able to use WinSCP and sudo -i? If not, how can I get normal root access without sudo?

Posted by Urosino, 10-08-2011, 11:01 AM
It looks like I am asking too much. Could someone share with me how to get this Sudo thing disabled and I always login as a root? Thanks guys!

Posted by UnderHost, 10-08-2011, 12:52 PM
This should help you: http://www.linuxquestions.org/questi...t-user-727813/

Posted by Urosino, 10-08-2011, 01:09 PM
Thank you UnderHost. Looks like a complex thing to set.

Posted by brianoz, 10-09-2011, 07:02 AM
In an ideal world, which is of course not always possible, you want to avoid logging in as root even via WinSCP - there's always a risk when you are operating with complete access to the system. It might be possible to do what you want with clever use of groups. I'm not sure what to suggest specifically, or even whether it could work for you in your scenario, but if it could it might solve your issues nicely. The basic idea is that you create a group to own the files you want to change (it can be a secondary group for the user) and you ensure the files are in that group (Easy with setgid on the directory) and that the files stay writable to group (a little harder, can be done with chmod in cron). Kind of messy actually I guess - you should be OK with root if you are careful.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Unprivileged users (Views: 604)
Softlayer outage? (Views: 656)
XML DTD (Views: 632)

Language: