"Brian" <brian.huether.DeleteThis@NOdlrSPAM.de> wrote in message
news:3a2d12e1f700fa84f216b2fcf8685b82@news.teranews.com...
> This must sound like the dummest question ever.
>
> In my FTP program, I can do a chmod on files and folders on my site. I
have
> a guitar lessons site, and people can upload audio, etc. When they are
doing
> this, what type of user are they considered? Owner, group, or other? I am
> really confused about this. When people are browsing, I would think we are
> all treated the same, in which case only one type of user needs 7 for
> permissions.
If they are browsing the user is the server resource they are using (in this
case the web server eg apache) Who the visitors are has nothing to do with
it - it is who has permission to access the resources requested - in this
example it is apache.
> When people do upload stuff, it is being done through PHP with the
> move_uploaded_file function. Sometimes I notice a permission error. So I
> will change the folder to 777. But does this really need to be? Surely 777
> is overdoing it.
Actually, it is being done through apache (or whatever else your web server
is called) php is only a script which is using a resource 'apache' which in
turn is a user!
To answer your qustion 777 is over doing it but sometimes the only way.
Perhaps more useful would be to identify which user owns the directory in
question. The set the permissions so the group to which apache belongs has
the correct access. (you need to know who is the owner as only the owner -
or root - can change the persmissions) Often apache runs as the user nobody!
>
Simple definition - are they users or visitors?
User is one who has access to the system be it a person with username /
password or a server resource like apache
Visitors are not users (for this purpose) They do not and never do get
direct access to the system when using a browser. Their browser makes a
request to the server - which generally (if the request is httpd) passes it
along to apache (a user) who acts on the request and returns (serves) the
requested info (if exists)
The only time a non 'registered' user would get access might be anonymous
ftp but even their the person would be running as anonymous - a preset user.
--
bildanet
MyLot.net - the home of the $10 reseller programme<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: How do file and folder permissions work?