cannot upload file via http

Paul Procacci pprocacci at gmail.com
Thu Mar 18 17:25:52 UTC 2021


This question isn't suitable for the FreeBSD mailing list as this isn't a
FreeBSD problem.

With that said, you must ensure all the directories leading up to the
directory you want to place the file in has the execute bit set so that the
user running as the web server has the ability to traverse the file system.
Not just the primary directory where the file will end up.

An example of what I mean:
root at nas:~ # find /tmp/test -type d -ls
101190        1 drwx------    3 root                             wheel
                              3 Mar 18 13:20 /tmp/test
101327        1 drwxrwxrwx    2 root                             wheel
                              2 Mar 18 13:20 /tmp/test/this

% touch /tmp/test/this/
touch: /tmp/test/this/: Permission denied

This advice is `blind` in a sense because there is no error message that
you actually provided.
Perhaps it boils down to the write actually taking place, yet happens in a
location you aren't expecting.
In cases like this, and in the case of FreeBSD you can truss(1) the web
server process and figure out exactly what it's doing.

~Paul

On Thu, Mar 18, 2021 at 9:39 AM <pkagan at videotron.ca> wrote:

> Hi I am trying and have been trying in multiple ways to be able to upload a
> file with php programming and http but for some reason it is not able to
> write. I know this because no write takes place. This could be with a
> wordpress or any content management system as well as my own php code. I
> went ahead and changed the user permissions to 755 and the ownership to
> www.
> What could be the  problem?
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at freebsd.org"
>


-- 
__________________

:(){ :|:& };:


More information about the freebsd-questions mailing list