Re: [PHP] Re: Permissions
[email protected] (Ethan Rosenberg)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
On 08/27/2013 03:07 AM, David Robley wrote: > Ashley Sheridan wrote: > >> On Tue, 2013-08-27 at 16:16 +0930, David Robley wrote: >> >>> Ethan Rosenberg wrote: >>> >>>> Dear List - >>>> >>>> Tried to run the program, that we have been discussing, and received a >>>> 403 error. >>>> >>>> rosenberg:/var/www# ls -la StoreInventory.php >>>> -rwxrwxrw- 1 ethan ethan 4188 Aug 26 20:26 StoreInventory.php >>>> >>>> rosenberg:/var# ls -ld www >>>> drwxrwxrw- 37 ethan ethan 20480 Aug 26 20:26 www >>>> >>>> I had set the S bit [probably a nasty mistake] and I thought I was able >>>> to remove the bit. [it doesn't show above] >>>> >>>> How do I extricate myself from the hole into which I have planted >>>> myself? >>>> >>>> TIA >>>> >>>> Ethan >>> >>> This is in no way a php question, as the same result will happen no >>> matter what you ask apache to serve from that directory. >>> >>> You have the directory permissions set to 776 not 777. >>> -- >>> Cheers >>> David Robley >>> >>> Steal this tagline and I'll tie-dye your cat! >>> >>> >> >> >> 776 won't matter in the case of a directory, as the last bit is for the >> eXecute permissions, which aren't applicable to a directory. What > > I beg to differ here. If the x bit isn't set on a directory, that will > prevent scanning of the directory; in this case apache will be prevented > from scanning the directory and will return a 403. > >> It's possible that this is an SELinux issue, which adds an extra layer >> of permissions over files. To see what those permissions are, use the -Z >> flag for ls. Also, check the SELinux logs (assuming that it's running >> and it is causing a problem) to see if it brings up anything. It's >> typically found on RedHat-based distros. >> >> Thanks, >> Ash >> http://www.ashleysheridan.co.uk > I checked with the -Z option ethan@rosenberg:/var/www$ ls -lZ StoreInventory.php -rwxrwsr-t 1 ethan ethan ? 4232 Aug 27 00:18 StoreInventory.php Ethan PS David- I promise that I will not steal your tag line. My short hair American tabby cat [Gingy Feline Rosenberg]is too nice to have anything done to her.