Hi Lee,
I know for Apache, httpd runs as the user, "nobody". Unless your directory is owned by "nobody", you need to open up access. That's why I run suPHP so that Apache runs as a user allowing 755-like permissions.

Eric Cope

On Wed, Apr 27, 2011 at 9:20 PM, <leegold@speedymail.org> wrote:
Hi,

I have a LAMP stack on my laptop for learning, "localhost". I'm using
Lighttpd instead of Apache.

When I try to upload some files via PHP code it didn't work. The target
folder is /var/www/uploaded_vids

It was 755 and uploads didn't work. I changed it to 777 and now the
uploads work. It's ls -l is now:

drwxrwxrwx 2 root root   4096 2011-04-27 20:50 uploaded_vids

maybe 775 would be enough? Nope, tried  775 for the dir and does *not*
work. Does it make sense that 775 was not enough permissions?

777 works. Is this normal? My browser or whatever component is uploading
is not root? But the server itself is running as root(?).

Could someone help me with uploads regarding permissions so I can better
understand? What are the permissions normally for an upload dir on a
server?

Thanks,

Lee G.
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss