pscp 无法读取 .profile

pscp 无法读取 .profile

我正在将文件从 Windows XP SP2 传输到 AIX 5.3。在我的 .profile 中,我已经umask 002定义了。传输后,文件始终具有 644 个权限,因此似乎 pscp 不会读取我的配置文件。作为测试,我尝试在 .profile 末尾执行回显,但在执行 pscp 时没有显示。我不确定 pscp 是否真的会显示正在回显的任何内容。

我的版本:

H:\User>pscp.exe -V
pscp: Development snapshot 2010-02-16:r8855

我的执行方式:

H:\User>pscp.exe -scp -p -v -pw PASSWORD test.txt USER@sdaa0124:/home/USER/test.txt

答案1

这是 shell 问题。您的 shell 仅读取 .profile 以进行交互式登录,而 scp 是非交互式会话。

我记不太清 AIX 了。查看 shell 的手册页,它会告诉您非交互式登录时它读取哪个文件。在该文件中,只需 source .profile(或添加所需的 umask 命令)。

相关内容