From: Ray Olszewski <ray@comarre.com>
To: eatley@wowcorp.com, linux-newbie@vger.kernel.org
Subject: Re: Setting permissions via SSH upload to 777
Date: Wed, 13 Oct 2004 12:23:14 -0700 [thread overview]
Message-ID: <5.1.0.14.1.20041013120622.01f2ecc8@celine> (raw)
In-Reply-To: <000001c4b154$84fb7de0$500aa8c0@lanadmin>
At 02:43 PM 10/13/2004 -0400, Eve Atley wrote:
>When someone SSH's into our Redhat Linux box, all files that are
>uploaded are set to read-only. How can I set it so files are
>automatically set to 777, or 775 at the very least?
First, you shouldn't. It is NEVER smart, from a security standpoint, to
create a *default* condition where a file is writable by someone other than
its owner. There are special situations in which you need to do this, of
course, but making it the system *default* for uploaded files -- especially
for executables, but even for config files -- is asking for trouble.
Second, are you talking here about scp transfers or something else? On a
case-by-case basis, a user of scp can (on the client end) use the -p flag
to preserve permissions so they match the settings on the source system.
Third, here I find that scp transfers default to 755 (or 644 if the source
file wasn't executable), a decent default setting. This is (or should be)
derived from the default umask setting, which on my system is set in
/etc/profile ... but can be modified on a user-by-user basis in
/etc/.bash_profile. The method of setting these defaults varies bit among
Linux distrbutions (I'm running Debian-Sid here), so Red Hat may use
.profile or .bashrc or some other variant for the user-level settings, and
/etc/login.defs for the systemwide settings. This is also shell specific,
so the details will be different if you don't use bash.
There is also a command-line app "umask" you can use to set this value for
a user. The only man page I can find for umask is a section-2 (programming
calls) entry, but it does explain how umask values relate to permissions.
BTW, I just saw your other message, and that respondant had write and
execute mixed up. 555 is r-xr-xr-x; 666 is rw-rw-rw-.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2004-10-13 19:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-13 17:29 Remote X Little, Chris
2004-04-14 12:01 ` Juan Facundo Suárez
2004-10-13 18:43 ` Setting permissions via SSH upload to 777 Eve Atley
2004-10-13 19:23 ` Ray Olszewski [this message]
2004-12-09 21:11 ` 2 questions: 1. ssh permissions to 777 and 2. recursively change all directories/files " Eve Atley
2004-12-09 21:12 ` Jeff Woods
2004-12-09 21:57 ` Ray Olszewski
2004-12-09 22:35 ` Simon Valiquette
2004-12-10 10:37 ` Jim Nelson
2004-12-10 13:53 ` J.
2004-12-10 21:05 ` Jim Nelson
2004-12-10 13:48 ` J.
2004-12-13 21:54 ` Stephen Samuel
[not found] <15DCB059E3814E448A1CFFF04F78F7A703917246@s99mail08>
2004-10-13 19:11 ` Setting permissions via SSH upload " Eve Atley
-- strict thread matches above, loose matches on Subject: below --
2004-10-13 19:13 Little, Chris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.1.20041013120622.01f2ecc8@celine \
--to=ray@comarre.com \
--cc=eatley@wowcorp.com \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox