From owner-freebsd-questions@freebsd.org Thu Mar 18 17:25:52 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 D057957DFD5 for ; Thu, 18 Mar 2021 17:25:52 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F1Yp81f75z4V1j for ; Thu, 18 Mar 2021 17:25:51 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: by mail-pg1-x532.google.com with SMTP id e33so1889391pgm.13 for ; Thu, 18 Mar 2021 10:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D34XmF82LI7dnyy9IzvAt5DLOzeKZcV61MlwRrJ0b8I=; b=B1HmC4Z48IxNet0ZkMBjOV0mXx9eZ4oJsHUly7CuKJ6uUbjOzF2T6BDZ4suJxTDIfH 6Pmd8K3BlRUv9aPNmWZr2FVGJf27sNqGOIjCwzeOx4t3aFiIFOIj6txUUdb/wGZI+91u c0BoHyQCO/gywhuz/JBRItZkfz/7G9xpXT5EGz8NSKbzJr9r/awYEQXVZvj6/RcoNNQI OLRRC65ojiua8MuLqLMEVPQJpkWtqOXDC6RDUqMVKu7VlTdqX8wZFJlKUpfvoio6+qy+ zyEMlIR45AEvzvWb000rQlWXjzk5Z1MGJbW8zNr+QcpuIbXF8fWD4sFt9CRv9dXoiLVj 3acg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D34XmF82LI7dnyy9IzvAt5DLOzeKZcV61MlwRrJ0b8I=; b=BVVRmbeOXSkko3ftu/eCVxsdQxB2MuWCqCvtmpdDhir0utfKh7tgPp9OFc677kCdVe aC2vYRig2HP9cxewJyCuIQQmoOxgwrkVk1FQEqF/7mJm92OggxauGVIp9O6CDZKOV8Lv vRf/9REaCrMxDfSNEPTvNHm0azS/dJ6PQ9pCOCcRKIUwSrDTGH28wHI1qGqvR+MoXf+9 gWVtLexpIuc4SrWt3RpDCVHpwtto9BimQ6HSPP/RAYOLzFeAiceQoqFfd9X2e/sSMenB 32M2BlIqHmN6uAH3umA627F8nZaiN6JBQkRQAw075FUIQrloGyU5w5WsxRLV+kwSAByG tdyw== X-Gm-Message-State: AOAM532lrABt19JT04U4gFA4XS47Bi7UzlPVR29ZCfsYsta/IVpVbE88 skzSgI+sHo/PqeQU01tw5Up8clBuOCzKxUp/sfCvcXdIKBZJ X-Google-Smtp-Source: ABdhPJyvCd08kI5zJYLX0MN2fZof1IkU1RFx5mIZJsfHmhrD0jfdpnj4wCOnSVkF1650/fFstmqMxVCDYZMKpJAWmX8= X-Received: by 2002:a05:6a00:ac8:b029:1ed:f8dc:cb3b with SMTP id c8-20020a056a000ac8b02901edf8dccb3bmr5094928pfl.60.1616088349320; Thu, 18 Mar 2021 10:25:49 -0700 (PDT) MIME-Version: 1.0 References: <02c101d71bfc$09a2ed20$1ce8c760$@videotron.ca> In-Reply-To: <02c101d71bfc$09a2ed20$1ce8c760$@videotron.ca> From: Paul Procacci Date: Thu, 18 Mar 2021 13:25:34 -0400 Message-ID: Subject: Re: cannot upload file via http To: pkagan@videotron.ca Cc: FreeBSD Questions X-Rspamd-Queue-Id: 4F1Yp81f75z4V1j X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=B1HmC4Z4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of pprocacci@gmail.com designates 2607:f8b0:4864:20::532 as permitted sender) smtp.mailfrom=pprocacci@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[videotron.ca]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::532:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::532:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::532:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] Content-Type: text/plain; charset="UTF-8" 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 17:25:52 -0000 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@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 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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > -- __________________ :(){ :|:& };: