In my work place, we can access our RedHat Linux system with our userid (authentication controlled by Microsoft Active Directory) or by a generic application user id.
We run all the web apps using app user id, and the application files and directories are under the ownership of app user id.
To copy files from windows to Linux app dirs we login with app user id in WinSCP.
But after the Target department store security breach they are restricting many facilities.
They are removing remote login access for app user id.
We have to login using MS-AD userid, then do su app user id.
This works for PuTTY, but not for WinSCP ( https://winscp.net/eng/docs/faq_su )
As well as my uid is not in the sudoers.
Along with this is another problem, we are unable to do chown or chgrp for files with my id or app user id.
But I can do chmod with my MS-AD user id or app user id for files with respective ownership.
So I do following steps to transfer files from Windows to Linux.
1. In WinSCP Login using ms-ad-uid
2. Run PuTTY, login with ms-ad-uid
3. In PuTTY, su app-uid
4. In PuTTY, go to the destination file transfer directory
5. In PuTTY, run “mkdir x” or another dir name which dont exist
6. In PuTTY, chmod 777 x
7. In PuTTY, cd x
8. In PuTTY, pwd
9. In PuTTY, copy output of pwd
10. In WinSCP, paste the new dir path from the clipboard
11. In WinSCP, copy file from Windows to Linux, wait till file transfer is over
12. In PuTTY, copy the newly transferred file to the parent dir
13. Repeat this process for every file.
14. In PuTTY, goto parent dir of “x”, then “rm -r x”
Now my RFE, is it possible to add an automated process for above steps using windows api SendMessage or some thing.