Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

testbot

It seems I had to visudo the /etc/sudoers file and comment out #Default requiretty

I'm not sure how that affects the security of things but i'll be looking into it.
testbot

Re: Solved

@Clint: I keep getting this when I try that:
winscp sudo Cannot initialize SFTP protocol. Is the host running a SFTP server?

I've checked the path to sftp-server in sshd_config and made sure it was the same in sudoers and WinSCP. still no luck.

I'm on centos.

Any help would be great.
jlightner

Sorry – just reread your last response and realized I'd misread it first time.

The final sentence of my last response explains why I can't run sftp-server as root. When I do it allows them to delete anything on the system via WinSCP instead of just deleting files owned by the specific adminaccount. That is to say the user the sftp-server that is running has the power of the user that is running it and I don't want to grant them root power. My counter question was why would anyone want to grant root power to users other than System Administrators?
jlightner

Do sudo adminaccount where?

Maybe I misunderstood something but it seemed you can't just do sudo adminaccount from within WinSCP because it starts sftp-server on connection. I thought the point of the thread was that due to this you have to do the sudo setup using root.

I did try modifying sudoers to su to adminaccount and then run sftp-server but none of the syntax I tried seemed to work. It was at that point that I posted my question on LQ.
Later I gave up trying to do it via sudoers (except for the grant to allow start of adminaccount-sftp-server after creating it as detailed) and came up with the workaround I posted on LQ and here.

Are you suggesting I could have them login via PuTTY, run sudo adminaccount then start sftp-server and somehow connect to that running sftp-server with WinSCP? If so I'd be interested in hearing how its done – I tried it and didn't get very far.

I do NOT want these users to do sftp-server as root as they would then be able to use WinSCP to accidentally do all sorts of things such as deleting critical files.
martin

jlightner wrote:

My counter question is why would one want to allow sudo to root on WinSCP transfer? Hopefully anyone setting that up is restricting it to System Administrators.

Sorry, I'm possibly not patient enough to try to understand all details. Though my question was not why you do sudo adminaccount