Technical article 114262

Creating files on a remote system using remote shell or rcp results in file permissions that are not consistent with the umask settings for that user.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

When creating remote files (rcmd,rcp,rsh..) on an OpenServer5 system, files are always created using a umask of 077, despite what the user's umask is configured to be.

Cause

For security reasons, the user's umask is ignored.

Solution

For `rcmd`/`rsh`, you can use an explicit `umask` command to set it
to what you want.
Example:
rcmd OSR5box "umask 022 ; touch foo"
For `rcp`, you can use its "-p" flag to preserve the permissions of
the source file.
Example:
rcp [ -p ] file1 file2
Or

rcp [ -p ] [ -r ] file ... directory

See also

ftp(TC), rcmd(TC), rcp.mn(C), rlogin(TC), rshd(ADMN), services(SFF)
profile(M), sh(C)

From the Xinuos technical article database, record 114262. Reproduced with permission. The original is at www.sco.com/ta/114262, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.