PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Does "nobody" is considered as group-member of others?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Does "nobody" is considered as group-member of others?

Réponse
 
LinkBack Outils de la discussion
Vieux 28/02/2008, 02h21   #1
Fro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Does "nobody" is considered as group-member of others?

Hi,

the operating system (Unix) considers a php-server as a user with name
"nobody". For example, if my php-script saves a file uploaded by a
user, the owner of the file will be "nobody". I would like to know if
"nobody" is considered as "group" or "others" (in terms of the "chmod"
command)? In other words, is "chmod g+w dirname" sufficient to allow
to "nobody" to write in the directory "dirname" or should I use "chmod
o+w dirname"?

Thank you.
  Réponse avec citation
Vieux 28/02/2008, 03h12   #2
Lars Eighner
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Does "nobody" is considered as group-member of others?

In our last episode,
<eca073b1-308a-436e-9f09-fa0d4c127eb7@j28g2000hsj.googlegroups.com>, the
lovely and talented Fro broadcast on comp.lang.php:

> Hi,


> the operating system (Unix) considers a php-server as a user with name
> "nobody". For example, if my php-script saves a file uploaded by a
> user, the owner of the file will be "nobody". I would like to know if
> "nobody" is considered as "group" or "others" (in terms of the "chmod"
> command)? In other words, is "chmod g+w dirname" sufficient to allow
> to "nobody" to write in the directory "dirname" or should I use "chmod
> o+w dirname"?


Usually 'nobody' is the least priviledged user (and is forbidden to login).

Thus, 'nobody' is an 'others' and should not be added to any other group.

--
Lars Eighner <http://larseighner.com/> usenet@larseighner.com
Countdown: 327 days to go.
  Réponse avec citation
Vieux 28/02/2008, 08h59   #3
Guillaume
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Does "nobody" is considered as group-member of others?

Fro a écrit :
> Hi,
>
> the operating system (Unix) considers a php-server as a user with name
> "nobody". For example, if my php-script saves a file uploaded by a
> user, the owner of the file will be "nobody". I would like to know if
> "nobody" is considered as "group" or "others" (in terms of the "chmod"
> command)? In other words, is "chmod g+w dirname" sufficient to allow
> to "nobody" to write in the directory "dirname" or should I use "chmod
> o+w dirname"?
>
> Thank you.


Usually, "nobody" user is set with "nogroup" group. Those are 2
differents things, "nobody" can't be considered as group, but nobody's
group ("nogroup" in my case) can.

"nobody" is a user, thus :
- if a file does belong to myname:myname, nobody is just an "other"
- if it's myname:nogroup, nobody has group access to the file *because*
his group is nogroup
- and nobody:myname or nobody:nogroup gives him access as the file owner.

The very best option to give write access to a folder which rights you
can modify then is to chgrp nogroup (or chown myname:nogroup), and then
chmod g+w that directory. Thus the owner ("myname") will still have his
user access, the webserver (and php) group access , and any other user
won't have any access.

Hope it's clearer... re-reading myself, I'm not sure :p

--
Guillaume
  Réponse avec citation
Vieux 28/02/2008, 09h05   #4
Guillaume
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Does "nobody" is considered as group-member of others?

Guillaume a écrit :
> Usually, "nobody" user is set with "nogroup" group.

My bad btw, it's right that there also are many distribs with
nobody:nobody. But the point is still there :p

--
Guillaume
  Réponse avec citation
Vieux 28/02/2008, 13h15   #5
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Does "nobody" is considered as group-member of others?

Fro wrote:
> Hi,
>
> the operating system (Unix) considers a php-server as a user with name
> "nobody". For example, if my php-script saves a file uploaded by a
> user, the owner of the file will be "nobody". I would like to know if
> "nobody" is considered as "group" or "others" (in terms of the "chmod"
> command)? In other words, is "chmod g+w dirname" sufficient to allow
> to "nobody" to write in the directory "dirname" or should I use "chmod
> o+w dirname"?
>
> Thank you.
>


Why aren't you asking this in a Unix newsgroup? It has absolutely
nothing to do with PHP.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  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 01h57.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, 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,10291 seconds with 13 queries