PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > Setting permissions to new files?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

Setting permissions to new files?

Réponse
 
LinkBack Outils de la discussion
Vieux 17/06/2007, 23h40   #1
Bruno Buys
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Setting permissions to new files?

Where do I change the permissions that are set when I create a new file?
I mean, I'd like to be able to change the default permissions that my
system atributes to new files.


bruno@merlin:~$ > newfile
bruno@merlin:~$ ls -l newfile
-rw-r--r-- 1 bruno bruno 0 2007-06-17 18:06 newfile


I'd like new files to be created as writable to the group, as in

-rw-rw-r-- 1 bruno bruno 0 2007-06-17 18:06 newfile


thanks!


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 17/06/2007, 23h50   #2
Magnus Therning
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Setting permissions to new files?

On Sun, Jun 17, 2007 at 18:11:02 -0300, Bruno Buys wrote:
>Where do I change the permissions that are set when I create a new file? I
>mean, I'd like to be able to change the default permissions that my system
>atributes to new files.
>
>bruno@merlin:~$ > newfile
>bruno@merlin:~$ ls -l newfile
>-rw-r--r-- 1 bruno bruno 0 2007-06-17 18:06 newfile
>
>I'd like new files to be created as writable to the group, as in
>
>-rw-rw-r-- 1 bruno bruno 0 2007-06-17 18:06 newfile


Look into umask.

/M

--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus.therning@gmail.com
http://therning.org/magnus

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBGdauxiMWTaatN+6QRAsVzAJ0U1ejuOjhWwBItXf30rj f5tkyMTwCeKlaI
pcRT+La2bAqSGKFChfp3z1U=
=N8Cj
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 18/06/2007, 03h50   #3
Bob Proulx
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Setting permissions to new files?

Bruno Buys wrote:
> Where do I change the permissions that are set when I create a new file?
> ...
> I'd like new files to be created as writable to the group, as in
> -rw-rw-r-- 1 bruno bruno 0 2007-06-17 18:06 newfile


It sounds like you are trying to set up a "User Private Group" type of
configuration. Is that correct? That is a typical and good
configuration to use in a group of users.

In that case you will want to modify /etc/profile and change the umask
setting there from 'umask 022' to 'umask 02'. That file is sourced by
login shells.

sudo editor /etc/profile

Note that the default install configuration for the root user is to
have /root/.bashrc set 'umask 022' and to have /root/.profile source
the /root/.bashrc file but these are often customized. Even when
using UPG for non-root users it is desirable to keep root's umask to
be 022. After making the above change to /etc/profile you should log
in as root and verify that root's umask is still 022. This is just in
case root's environment has been customized and the umask setting
removed.

Bob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 18/06/2007, 07h00   #4
Bruno Buys
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Setting permissions to new files?

Bruno Buys wrote:
> Where do I change the permissions that are set when I create a new
> file? I mean, I'd like to be able to change the default permissions
> that my system atributes to new files.
>
>
> bruno@merlin:~$ > newfile
> bruno@merlin:~$ ls -l newfile
> -rw-r--r-- 1 bruno bruno 0 2007-06-17 18:06 newfile
>
>
> I'd like new files to be created as writable to the group, as in
>
> -rw-rw-r-- 1 bruno bruno 0 2007-06-17 18:06 newfile
>
>
> thanks!
>

Umask did the trick. Kde seems to be following /etc/profile, so i edited
it. Konsole and yakuake needed a 'umask 02' added to ~/.bashrc (there
was none) to behave well. Neither one was reading ~/.bash_profile, by
the way. It remembers me when I was trying to add ~/bin to my path.
There was

if [ -d ~/bin ] ; then
PATH=~/bin:"${PATH}"
fi

but not worked.
Anyway, the issue is solved. Thanks all!




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 18/06/2007, 08h40   #5
Felipe Sateler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Setting permissions to new files?

Bruno Buys wrote:

> Konsole and yakuake needed a 'umask 02' added to ~/.bashrc (there
> was none) to behave well. Neither once was reading ~/.bash_profile, by
> the way.


That is because ~/.bash_profile is read on login shells only (unless you
source it from ~/.bashrc

--

Felipe Sateler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 18/06/2007, 18h10   #6
Bob Proulx
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Setting permissions to new files?

Felipe Sateler wrote:
> Bruno Buys wrote:
> > Konsole and yakuake needed a 'umask 02' added to ~/.bashrc (there
> > was none) to behave well. Neither once was reading ~/.bash_profile, by
> > the way.

>
> That is because ~/.bash_profile is read on login shells only (unless you
> source it from ~/.bashrc


This is a very old issue that still has not been resolved, despite it
having been closed during the migration from XFree86 to X.org. Please
read through Bug#250765 for history.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250765

Summary:

cat >$HOME/.xsession <<EOF
#!/bin/bash --login
exec x-session-manager
EOF
chmod a+x $HOME/.xsession

Bob


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 18/06/2007, 21h00   #7
Oscar Blanco
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Setting permissions to new files?

>From konsole use these:
chmod
chown

Chmod changes permissions. Type "$ man chmod" to know how to change them.
Chown changes owner. Type "$ man chown" to know how to change them.

E.g.
# mkdir /home/temp
# ls -l /home/temp
# chmod 777 /home/temp
# ls -l /home/temp
# chown bruno /home/temp
# ls -l /home/temp


Kind regards,

--
Oscar Blanco García
Ingeniero Electrónico - Universidad Nacional de Colombia
Teléfono: Casa: +57 1 687 0019
Celular: +57 3133890451
Carrera 123B # 131-66 Bloque 55 Apartamento 402
Bogotá, Colombia

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h52.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12190 seconds with 15 queries