473,416 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Does "nobody" is considered as group-member of others?

Fro
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.
Feb 28 '08 #1
4 2680
In our last episode,
<ec**********************************@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/us****@larseighner.com
Countdown: 327 days to go.
Feb 28 '08 #2
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
Feb 28 '08 #3
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
Feb 28 '08 #4
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.
js*******@attglobal.net
==================

Feb 28 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Askari | last post by:
(Help for Pygame module) Hi, How I can make a "fadeout text"(alpha at 255,254,253...0) on a surface and my surface's background must be transparatly? Note : I can do a fadeout but with a...
9
by: Nicolae Fieraru | last post by:
Hi All, I try to use Request.ServerVariables("HTTP_REFERER") in a script and I discovered it doesn't work as expected. I use XP with SP2 and I created a link on a web site which points to an asp...
24
by: AES/newspost | last post by:
On many web sites or pages (including my own home page) clicking on certain links will start downloading a PDF file, sometimes without the author having provided any warning in the text of the page...
134
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
81
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there...
6
by: Ji | last post by:
Hi I have a sting which is -- This is a "dog" ! then I needed to named it to a string variable such as Dim S as string S = "This is a "dog"! " But it does not work ,how to make it? Thanks
4
by: Jason | last post by:
I'm troubleshooting a program that I didn't build, so forgive me on this one. It's called email.php, and it looks like a program that the original developer must have downloaded from somewhere. ...
65
by: Aditya | last post by:
Hi I am using a line of as char recvedValues = {'\0'}; in my code. I get a warning as near initialization for recvedValues. I am using gcc 3.4 Can anybody please explain the meaning. Thanks...
84
by: aarklon | last post by:
Hi all, I found an interesting article here:- http://en.wikipedia.org/wiki/Criticism_of_the_C_programming_language well what do you guys think of this article....??? Is it constructive...
4
by: jamesnkk | last post by:
Hello, I am a newbie in Linux. My company have a tester machine installed with Suse 10 samba. I have set the IP address of the Linux machine to connect into the Windows 2003 server. So from my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.