Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm transfering a file from Windows XP SP2 to AIX 5.3. In my .profile I have umask 002defined. After the transfer, the file always has 644 permissions, so it seems pscp doesn't read my profile. As a test I've tried doing an echo at the end of my .profile, which doesn't show up when I execute pscp. I'm not sure whether pscp would actually show anything that's being echo'd.

My version:

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

My execution:

H:\User>pscp.exe -scp -p -v -pw PASSWORD test.txt USER@sdaa0124:/home/USER/test.txt
share|improve this question
up vote 3 down vote accepted

This is a shell issue. Your shell only reads .profile for interactive logons and scp is a non-interactive session.

I don't remember much about AIX anymore. Look in the manpage for your shell, it will tell you which file it reads for non-interactive logins. In that file, simply source .profile (or add the umask command that you need).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["                       <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\n                </div>\n            </div>\n\n            <div id=\"copyright\">\n                site design / logo &#169; 2016 Stack Exchange Inc; user contributions licensed under <a href=\"https://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\n            </div>\n            <div id=\"svnrev\">\n                rev 2016.2.5.3240\n            </div>\n            \n        </div>\n    </div>\n    <noscript>\n        <div id=\"noscript-warning\">Server Fault works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\n    </noscript>\n<script"], "copyright__copyright__copyright": ["interactive logons and scp is a non-interactive session.\n\nI don't remember much about AIX anymore. Look in the manpage for your shell, it will tell you which file it reads for non-interactive logins. In that file, simply source .profile (or add the umask command that you need).\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}