public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Ray Olszewski <ray@comarre.com>
To: linux-newbie@vger.kernel.org
Subject: RE: Simple script to set permissions on folders daily - write script and cron it?
Date: Tue, 29 Mar 2005 07:51:19 -0800	[thread overview]
Message-ID: <5.1.0.14.1.20050329074310.01ff0690@celine> (raw)
In-Reply-To: <C6FD667B200BDF4F964C1BA77B796CE20F5E4A@cnbmail2.city.north -bay.on.ca>

At 09:31 AM 3/29/2005 -0500, Mike Turcotte wrote:
>I am fairly new to the linux scene, and I am currently using Gentoo
>Linux. How exactly do I go about setting a global default umask value to
>set 777 permissions on a particular folder and its contents?
[...]

You don't. That's not how umask works. Instead, it sets default permissions 
for *all* files saved by a particular account (userid).

If you want to make this change for all userids (or all except root), do it 
in some file that sets the environment globally. For the bash shell, this 
is probably /etc/profile (that's the standard one, and I imagine Gentoo 
follows the standard). For example, my /etc/profile file contains this line:

         umask 022

A umask is the (octal) inverse of permissions, so this sets the default 
permissions to 755. For a default of 777, set the umask to 000.

If you want to make the change for specific accounts (userids), put a line 
to reset the umash in that account's individual configuration file. This 
varies in name a bitr more than systemwide files, but ones to look for are 
(in the account's home directory) .profile, .bash_profile, or .bashrc (use 
"ls -a" to display filenames that begin with a .).

I don't know of a way to set default permissions for a specific directory 
only, which is why I didn't discourage Eve from taking the approach she 
described for her problem. Perhaps someone else does, though ... we'll have 
to wait and see.

         

-
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

       reply	other threads:[~2005-03-29 15:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <C6FD667B200BDF4F964C1BA77B796CE20F5E4A@cnbmail2.city.north -bay.on.ca>
2005-03-29 15:51 ` Ray Olszewski [this message]
2005-03-29 18:26 Simple script to set permissions on folders daily - write script and cron it? Mike Turcotte
2005-03-29 18:45 ` J.
  -- strict thread matches above, loose matches on Subject: below --
2005-03-29 16:37 Mike Turcotte
2005-03-29 17:02 ` J.
2005-03-29 18:20   ` Ray Olszewski
2005-03-29 19:27     ` J.
2005-03-29 14:31 Mike Turcotte
2005-03-29 15:54 ` Eve Atley
2005-03-29 16:51   ` J.
2005-03-23 20:28 Setting quota on user's home folders? Jessica_Schieffer
2005-03-28 21:02 ` Simple script to set permissions on folders daily - write script and cron it? Eve Atley
2005-03-28 21:05   ` John T. Williams
2005-03-28 21:35   ` Ray Olszewski
2005-03-28 23:11   ` J.

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.20050329074310.01ff0690@celine \
    --to=ray@comarre.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