From: Jim Nelson <james4765@verizon.net>
To: eatley@wowcorp.com
Cc: linux-newbie@vger.kernel.org
Subject: Re: 2 questions: 1. ssh permissions to 777 and 2. recursively change all directories/files to 777
Date: Fri, 10 Dec 2004 05:37:54 -0500 [thread overview]
Message-ID: <41B97C82.8060409@verizon.net> (raw)
In-Reply-To: <00ac01c4de33$b3b63e20$1f0aa8c0@lanadmin>
Eve Atley wrote:
> First question...
> We have people SSHing into our Linux box from overseas (India to US, company
> access only). But files that are uploaded from these people become read-only
> to anyone else accessing them. We *require* that they be readable/writable
> by this side of the pond (US). How can I set this to occur? Otherwise, this
> method of transferring files will *not* work for us, and perhaps someone can
> point me to another solution.
>
> Second question...
> How can I recursively set all files/directories to 777?
> Chmod -R 777 *.* ... Didn't seem to hit everything.
>
> Thanks!
>
> -Eve
>
Question 1:
Try setting the umask in the .profile for the people ssh'ing in.
Question 2:
Try the following:
-----------------------------------[cut]--------------------------------------------
#!/bin/bash
echo "Chowning files to jim:users..."
find -name \* | sed 's/^/"/' | sed 's/$/"/' | xargs chown jim:users $1
echo " done."
echo "Fixing directory permissions..."
find -type d | sed 's/^/"/' | sed 's/$/"/' | xargs chmod 775 $1
echo " done."
echo "Fixing file permissions..."
find -type f | sed 's/^/"/' | sed 's/$/"/' | xargs chmod 664 $1
echo " done."
-----------------------------------[cut]--------------------------------------------
I use this to fix permissions on a Samba box - you will have to modify or drop the
chown line to leave the ownership properties alone.
The sed lines enclose the file names in quotes - necessary if there are spaces or
metacharacters in the file names. The only thing that breaks the script is
filenames with doublequotes in them - the only way I can fix them is a manual
search and repair.
-
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-12-10 10:37 UTC|newest]
Thread overview: 13+ 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
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 [this message]
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
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=41B97C82.8060409@verizon.net \
--to=james4765@verizon.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.