[ciapug] PHP file upload and permissions....
Jerry Weida
ciapug@cialug.org
Tue, 8 Mar 2005 14:28:03 -0600
yes, directories need the +x attribute set. This allows a user (in
this case your webserver) to cd into that directory.
On Tue, 08 Mar 2005 14:17:41 -0600, Jonathan Bailey <jcbailey@code0.net> wrote:
> Sweet! After a chmod g+s, it works fine. BTW, the upload method is PHPs
> move_uploaded_file (or whatever it actually is) function. BTW, do
> directories need X set on them? It seems that if I remove X on
> directories, Apache complains about not being able to access .htaccess....
>
> Jon
>
>
> David Champion wrote:
>
> > What's "groups www-data" return? The "usermod" syntax is goofy, and I
> > know I've messed it up before.
> >
> > Also, a look at "ls -la files" might be helpful for troubleshooting.
> >
> > Could be that whatever upload method you're using is trying to chown
> > the files too (older versions of WinSCP would complain about this). I
> > usually do a "chmod g+s <folder>" to maintain group ownership on
> > directories & contents in this kind of situation.
> >
> > -dc
> >
> > Jonathan Bailey wrote:
> >
> >> Here's the issue. My webserver runs under www-data. I have a user (in
> >> /etc/passwd) of the name 'codeclub'. www-data is a member of the
> >> group 'codeclub'. I'm attempting to upload a file to that directory.
> >> Here is how the directory has it's permissions:
> >>
> >> drwxrwxr-x 2 codeclub codeclub 1.3K 2005-03-08 11:14 files
> >>
> >> Apache should be able to upload to this since www-data is a member of
> >> codeclub, right? For some reason, it doesn't work. If I chmod o+w
> >> files, I can upload fine... Here is a uploaded file permisssions
> >> after doing o+w on the directory:
> >>
> >> -rw-r--r-- 1 www-data www-data 980K 2005-03-08 11:14
> >> winscp374.exe
> >>
> >> Any ideas on why I have to make it world writable? Shouldn't just
> >> group writable work?
> >>
> >> Jon
> >
> >
> > _______________________________________________
> > ciapug mailing list
> > ciapug@cialug.org
> > http://cialug.org/mailman/listinfo/ciapug
> >
>
> _______________________________________________
> ciapug mailing list
> ciapug@cialug.org
> http://cialug.org/mailman/listinfo/ciapug
>