From owner-freebsd-questions@freebsd.org Thu Mar 18 20:10:45 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8DD15AB7D3 for ; Thu, 18 Mar 2021 20:10:45 +0000 (UTC) (envelope-from pkagan@videotron.ca) Received: from alt41.smtp-out.videotron.ca (alt41.smtp-out.videotron.ca [23.233.128.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F1dSN6GlCz4hTk for ; Thu, 18 Mar 2021 20:10:44 +0000 (UTC) (envelope-from pkagan@videotron.ca) Received: from [192.168.1.20] ([173.176.219.200]) by Videotron with SMTP id MyyfllFMHbSemMyyhl7L2T; Thu, 18 Mar 2021 16:10:43 -0400 X-Authority-Analysis: v=2.3 cv=COhUoijD c=1 sm=1 tr=0 a=oaKXazPqqAQRKKEMLXbeDQ==:117 a=oaKXazPqqAQRKKEMLXbeDQ==:17 a=pGLkceISAAAA:8 a=aE0cJvjpAAAA:8 a=6I5d2MoRAAAA:8 a=Sm-718XjqODxzBf6sCAA:9 a=QEXdDO2ut3YA:10 a=bvjMhJzLnbMMivruDs4A:9 a=IYLoui_MP1wx5Suy:21 a=_W_S_7VecoQA:10 a=y-4rJCg2yiSUOuYm88t7:22 a=IjZwj45LgO3ly-622nXo:22 From: Paul Mime-Version: 1.0 (1.0) Subject: Re: cannot upload file via http Date: Thu, 18 Mar 2021 16:10:41 -0400 Message-Id: <2B2FAC62-8B7D-4682-BDD0-B2C1491625A5@videotron.ca> References: Cc: FreeBSD Questions In-Reply-To: To: Paul Procacci X-Mailer: iPad Mail (18D52) X-CMAE-Envelope: MS4wfCE80rBMelFWGo+KHiGxgB4ikMANSYOdhmNo7sEF6ASftmt+eMZ2ztIWz7nA55Hp66r+nX8MPoOlXE642dLZVqLal2ezLN6rEK0VCuYLSWIux8j7LJYc URjSXJzlqSduDxKWI9A8nrLpPXVGp8TffnnXSTufAekyM0+ngesHdF4n4JIZ1rkplUtratFaGfLcKfQznJjqNQ9clVNgy12nBQb9EK8kHZTxSmrIkwuOwmVR X-Rspamd-Queue-Id: 4F1dSN6GlCz4hTk X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pkagan@videotron.ca designates 23.233.128.28 as permitted sender) smtp.mailfrom=pkagan@videotron.ca X-Spamd-Result: default: False [-2.90 / 15.00]; FREEMAIL_FROM(0.00)[videotron.ca]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:23.233.128.28/30]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.995]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_IN_DNSWL_LOW(-0.10)[23.233.128.28:from]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[videotron.ca]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:5769, ipnet:23.233.128.0/18, country:CA]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[23.233.128.28:from]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[videotron.ca]; SPAMHAUS_ZRD(0.00)[23.233.128.28:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2021 20:10:45 -0000 It does not work I set the permissions to 777 for document root and it does n= ot work. The owner is www. I wish to be able to upload a file , it worked at= 1 time not sure why it no longer works on several websites. It=E2=80=99s us= eful for wordpress or like if I just want to be able to upload a document. Envoy=C3=A9 de mon iPad > Le 18 mars 2021 =C3=A0 13:25, Paul Procacci a =C3=A9= crit : >=20 > =EF=BB=BF > This question isn't suitable for the FreeBSD mailing list as this isn't a = FreeBSD problem. >=20 > With that said, you must ensure all the directories leading up to the dire= ctory 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. >=20 > An example of what I mean: > root@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 >=20 > % touch /tmp/test/this/ > touch: /tmp/test/this/: Permission denied >=20 > This advice is `blind` in a sense because there is no error message that y= ou 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 se= rver process and figure out exactly what it's doing. >=20 > ~Paul >=20 >> On Thu, Mar 18, 2021 at 9:39 AM 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 w= ww. >> What could be the problem? >>=20 >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >=20 >=20 > --=20 > __________________ >=20 > :(){ :|:& };: