Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora User (http://www.linux-archive.org/fedora-user/)
-   -   Make newly created directories 0775 by default (http://www.linux-archive.org/fedora-user/45608-make-newly-created-directories-0775-default.html)

"Excalibur Xcalibur" 02-02-2008 07:04 PM

Make newly created directories 0775 by default
 
Hi all,********* Presently when somebody creates a directory, it's 0755. i.e. not writable by the group. I have a file server and would like to change this default property such that when somebody created a directory it's 0775. i.e. writable by the group. For my file server, this is a must as users of the same group need to be able to edit each others folders. Thanks.
-- Peter "Excalibur"

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

"Dick Seabrook" 02-02-2008 08:41 PM

Make newly created directories 0775 by default
 
2008/2/2 Excalibur Xcalibur <excalibur.xcalibur@gmail.com>:

Hi all,********* Presently when somebody creates a directory, it's 0755. i.e. not writable by the group. I have a file server and would like to change this default property such that when somebody created a directory it's 0775. i.e. writable by the group. For my file server, this is a must as users of the same group need to be able to edit each others folders. Thanks.

-- Peter "Excalibur"


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


You probably need to set your umask to 0002 instead of 0022
Check your manual for instructions for your shell.
Dick S.
--
Dick Seabrook ~ Anne Arundel Community College

http://enterprise.aacc.edu/~rhs ~ Speed the Net!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

"Garry T. Williams" 02-02-2008 08:46 PM

Make newly created directories 0775 by default
 
On Saturday 02 February 2008 15:04:16 Excalibur Xcalibur wrote:
> Hi all,
> Presently when somebody creates a directory, it's 0755.
> i.e. not writable by the group. I have a file server and would like
> to change this default property such that when somebody created a
> directory it's 0775. i.e. writable by the group. For my file
> server, this is a must as users of the same group need to be able
> to edit each others folders. Thanks.

The file server or file system does not supply the information you
want defaulted. Each user supplies the modification mask for a new
file or directory.

A user can set a default for the modification mask on his files and
directories, though. This is called the umask. This command will set
the umask for the current process (shell) to the default you want:

umask 002

You could request users to set this in their login scripts or you
could even set it for them by modifying /etc/profile and/or other
files run by various shells.

But, in the end, the user controls this.

--
Garry T. Williams --- +1 678 656-4579


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Matthew Saltzman 02-02-2008 09:57 PM

Make newly created directories 0775 by default
 
On Sat, 2008-02-02 at 16:46 -0500, Garry T. Williams wrote:
> On Saturday 02 February 2008 15:04:16 Excalibur Xcalibur wrote:
> > Hi all,
> > Presently when somebody creates a directory, it's 0755.
> > i.e. not writable by the group. I have a file server and would like
> > to change this default property such that when somebody created a
> > directory it's 0775. i.e. writable by the group. For my file
> > server, this is a must as users of the same group need to be able
> > to edit each others folders. Thanks.
>
> The file server or file system does not supply the information you
> want defaulted. Each user supplies the modification mask for a new
> file or directory.
>
> A user can set a default for the modification mask on his files and
> directories, though. This is called the umask. This command will set
> the umask for the current process (shell) to the default you want:
>
> umask 002
>
> You could request users to set this in their login scripts or you
> could even set it for them by modifying /etc/profile and/or other
> files run by various shells.

For bash, this snippet is in /etc/bashrc:

if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi

So if it's not a system account and the userid and group id are the same
(as is usual on first login for normal users), umask is already 002.

In the "user private group" scheme that Red Hat uses, you would create a
separate project group and set the project directory's setgid bit so
that files created there inherit the directory's group. If a user is a
member of the project group then he can log in with his usual private
group (and get umask 002) and any file he creates in the project
directory will get the project groupid and be group writable.

>
> But, in the end, the user controls this.

The above applies as long as the user includes /etc/bashrc in .bashrc
doesn't override the default set there.

A similar snippet is in /etc/csh.cshrc.

HTH.


--
Matthew Saltzman

Clemson University Mathematical Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Brian Chadwick 02-03-2008 12:38 AM

Make newly created directories 0775 by default
 
Excalibur Xcalibur wrote:

Hi all,
Presently when somebody creates a directory, it's 0755. i.e.
not writable by the group. I have a file server and would like to
change this default property such that when somebody created a
directory it's 0775. i.e. writable by the group. For my file server,
this is a must as users of the same group need to be able to edit each
others folders. Thanks.


--
Peter "Excalibur"



edit /etc/bashrc

change umask 022 to umask 002.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Matthew Saltzman 02-03-2008 01:54 PM

Make newly created directories 0775 by default
 
On Sun, 2008-02-03 at 11:38 +1000, Brian Chadwick wrote:
> Excalibur Xcalibur wrote:
> > Hi all,
> > Presently when somebody creates a directory, it's 0755. i.e.
> > not writable by the group. I have a file server and would like to
> > change this default property such that when somebody created a
> > directory it's 0775. i.e. writable by the group. For my file server,
> > this is a must as users of the same group need to be able to edit each
> > others folders. Thanks.
> >
> > --
> > Peter "Excalibur"
>
>
> edit /etc/bashrc
>
> change umask 022 to umask 002.

A normally logged in non-system user (with uname and group the same)
already has umask set to 002 in /etc/bashrc.

>

--
Matthew Saltzman

Clemson University Mathematical Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Brian Chadwick 02-03-2008 11:03 PM

Make newly created directories 0775 by default
 
Matthew Saltzman wrote:

On Sun, 2008-02-03 at 11:38 +1000, Brian Chadwick wrote:


Excalibur Xcalibur wrote:


Hi all,
Presently when somebody creates a directory, it's 0755. i.e.
not writable by the group. I have a file server and would like to
change this default property such that when somebody created a
directory it's 0775. i.e. writable by the group. For my file server,
this is a must as users of the same group need to be able to edit each
others folders. Thanks.


--
Peter "Excalibur"


edit /etc/bashrc

change umask 022 to umask 002.



A normally logged in non-system user (with uname and group the same)
already has umask set to 002 in /etc/bashrc.



correct





--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

02-04-2008 10:13 PM

Make newly created directories 0775 by default
 
> Hi all,
> Presently when somebody creates a directory, it's 0755. i.e. not
> writable by the group. I have a file server and would like to change this
> default property such that when somebody created a directory it's 0775.
> i.e.
> writable by the group. For my file server, this is a must as users of the
> same group need to be able to edit each others folders. Thanks.

You say file server. Does that mean you are using Samba? If so, I
believe you would want to add a line like this:

force directory mode = 0770

You would want to add this to your smb.conf file (found in /etc/samba on
my system). Then you would probably need to restart Samba by doing
something like this:

/etc/init.d/smb restart




--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Cameron Simpson 02-04-2008 10:18 PM

Make newly created directories 0775 by default
 
On 04Feb2008 18:13, aragonx@dcsnow.com <aragonx@dcsnow.com> wrote:
| > Presently when somebody creates a directory, it's 0755. i.e. not
| > writable by the group. I have a file server and would like to change this
| > default property such that when somebody created a directory it's 0775.
| > i.e.
| > writable by the group. For my file server, this is a must as users of the
| > same group need to be able to edit each others folders. Thanks.
|
| You say file server. Does that mean you are using Samba? If so, I
| believe you would want to add a line like this:
|
| force directory mode = 0770

Or 755, to match the other examples.

| You would want to add this to your smb.conf file (found in /etc/samba on
| my system). Then you would probably need to restart Samba by doing
| something like this:
| /etc/init.d/smb restart

It's enough to kill the particular smdb serving the client machine, which can
be obtained from the smbstatus command. We tend to prefer this when fixing a
problem for an individual user.

Of course, a restart is the sensible thing to fix a fproblem affecting
all the users.

Cheers,
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

02-05-2008 06:09 PM

Make newly created directories 0775 by default
 
> | You would want to add this to your smb.conf file (found in /etc/samba on
> | my system). Then you would probably need to restart Samba by doing
> | something like this:
> | /etc/init.d/smb restart
>
> It's enough to kill the particular smdb serving the client machine, which
> can
> be obtained from the smbstatus command. We tend to prefer this when fixing
> a
> problem for an individual user.

In this case, since he wants all directories created by all users to have
the new group permissions, he would have to use the restart method
originally suggested right?



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


All times are GMT. The time now is 08:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.